Skip to content

Instantly share code, notes, and snippets.

@jmingtan
Created April 14, 2018 03:16
Show Gist options
  • Save jmingtan/3886fd0ad6da53100f6c59be651c755d to your computer and use it in GitHub Desktop.
Save jmingtan/3886fd0ad6da53100f6c59be651c755d to your computer and use it in GitHub Desktop.
Clojure CLI setup with rebel-readline and cider middleware
{:aliases
{:dev {:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.2"}
org.clojure/tools.nrepl {:mvn/version "0.2.12"}
cider/cider-nrepl {:mvn/version "0.17.0-SNAPSHOT"}}
:main-opts ["-m" "repl"]}}}
(ns repl
(:require [clojure.tools.nrepl.server :as nrepl-server]
[cider.nrepl :refer [cider-nrepl-handler]]
[rebel-readline.main :as rebel]))
(defn -main []
(println "nrepl server at port 7888")
(nrepl-server/start-server :port 7888 :handler cider-nrepl-handler)
(rebel/-main)
(System/exit 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment