Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sogaiu/3ad7a855b74e48cf3fdb1fee813e6922 to your computer and use it in GitHub Desktop.
Save sogaiu/3ad7a855b74e48cf3fdb1fee813e6922 to your computer and use it in GitHub Desktop.
socket repl setup for clojureclr via an environment variable

Socket REPL Setup for ClojureCLR (>= 1.10) via an Environment Variable

For a *NIX-like setup (e.g. Linux, macos, etc.) it is possible to set an environment variable named clojure.server.repl for the purpose of launching a socket repl like this:

$ env clojure.server.repl="{:port,7650,:accept,clojure.core.server/repl}" bash

That starts a new bash that has an appropriate environment variable. Note that a straight-forward use of export to do this may not work.

Subsequent to the new bash starting, you can:

$ Clojure.Main

and there should be a socket repl running on the specified port (in this example, that's 7650)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment