Skip to content

Instantly share code, notes, and snippets.

@theronic
Created March 1, 2018 10:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save theronic/84bf4c315246deef9876d6d0837b8436 to your computer and use it in GitHub Desktop.
Save theronic/84bf4c315246deef9876d6d0837b8436 to your computer and use it in GitHub Desktop.
How to start an nREPL using Clojure CLI tools using clj
$ 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.
@theronic
Copy link
Author

Note that tools.nrepl has moved to nrepl/repl

@johnjelinek
Copy link

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