Fork me on GitHub

Hi. I’m a bit confused with my workflow using clj and deps.edn. Everything was so magic with lein, I never had to actually understand what was going on. 🙂 no such luxury/laziness here.


I have an app that has both an API server and a clojurescript frontend. The server is using http-kit.


In my deps.edn I have {:aliases {:run {:main-opts [ "-m" "alexandria.core" ] } } — in alexandria.core I initialize the db, start the http-kit server etc.


In my global deps.edn, I have the alias :nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.6.0"}}}


What I would like to do is start the server, and have an nrepl session start at the same time, preferably with both a repl prompt and a server to connect to from the editor (I use fireplace/vim)


Right now I’m starting the server with clj -A:run, which doesn’t start a repl as near as I can tell


and in a different terminal clj -R:nrepl -m nrepl.cmdline, which starts a nrepl server


and in a different terminal just clj to get a repl prompt

Alex Miller (Clojure team)16:07:16

you might need something more here to get an nrepl client, not just a repl ?


and in a different terminal shadow-cljs watch alexandria to get clojurescript compiling plus a clojurescript repl going


I’m sure this is not the Right Way to do things.

Alex Miller (Clojure team)16:07:05

you could probably write a tiny script that combines several of these things and call that instead

Alex Miller (Clojure team)16:07:16

and I'm not sure if you need the clj at all?