How to start an nREPL using Clojure CLI tools using clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ clj -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.12"}}}' | |
Clojure 1.9.0 | |
user=> (use '[clojure.tools.nrepl.server :only (start-server stop-server)]) | |
nil | |
user=> (defonce server (start-server :port 7888)) | |
#'user/server | |
;; now connect to port 7888. there's probably a way to do this in one line. |
Here's a one-liner:
clj -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"}}}' -m nrepl.cmdline --interactive
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that tools.nrepl has moved to nrepl/repl