This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-17
Channels
- # aws (3)
- # beginners (104)
- # boot (11)
- # calva (3)
- # clj-kondo (1)
- # cljdoc (6)
- # cljs-dev (23)
- # cljsrn (1)
- # clojure (144)
- # clojure-dev (54)
- # clojure-europe (6)
- # clojure-italy (2)
- # clojure-nl (26)
- # clojure-spec (6)
- # clojure-sweden (1)
- # clojure-uk (13)
- # clojurescript (38)
- # core-async (9)
- # cursive (14)
- # data-science (3)
- # datascript (22)
- # datomic (17)
- # figwheel (1)
- # fulcro (4)
- # graphql (6)
- # hoplon (59)
- # jackdaw (2)
- # jobs (6)
- # jobs-discuss (44)
- # juxt (14)
- # leiningen (1)
- # luminus (3)
- # nrepl (3)
- # off-topic (12)
- # re-frame (24)
- # reagent (7)
- # reitit (7)
- # rewrite-clj (1)
- # schema (1)
- # shadow-cljs (37)
- # spacemacs (4)
- # sql (25)
- # testing (12)
- # tools-deps (11)
- # utah-clojurians (1)
i have an alias for starting a socket repl in my ~/.clojure/deps.edn -- does anyone have a good way to get the port chosen to be somewhat random and then print that port number to stdout so i know where to connect to?
I don’t think you can parameterize over aliases like that, but you could write a small script around it perhaps?
rather than relying on the startup params, you could just write a small .clj that programmatically chose a random port and started the server
and then have the alias run that
this is really just a call to https://clojure.github.io/clojure/clojure.core-api.html#clojure.core.server/start-server
with the same params you pass on the cmdline mostly
As an example, here's what we do at work.
As an example, here's what we do at work.
That also starts Cognitect's REBL if it's on the classpath. And it saves the Socket REPL port in a dot file for next time.
(to sort of match what nREPL tools do)