Fork me on GitHub

I'm using to add a new file/namespace called handlers to an existing project, practicalli/banking. I assume this is the right command given an alias called :new in my user level deps.edn file. It seems to work okay.

clojure -R:new -m clj-new.generate ns=practicalli.handlers
cc @seancorfield


That's a reasonable approach. I'd probably add a :gen alias so I didn't have to type -m clj-new.generate each time.


(caution: the generators are very primitive and not particularly well thought out -- I don't actually find them valuable and I would prefer they not be promoted as a way to do anything!)


At some point, they'll probably be completely rewritten (in a new ns, naturally).


Ok, thanks. I only just used it today for the first time successfully. I tried previously but was getting an error as I didnt include any kind of clj-new alias, so content in just getting it working for myself 🙂


I am more interested in writing some templates to use with clj-new, so will focus on that instead, which I assume is quite stable.


@jr0cket Yup, if you run into any problems, feel free to DM me about it.


The built-in app/lib templates are probably a good place to get started. Also let me know if you have suggestions for improving the README around writing templates.

👍 3

What's the best way to run a socket or nrepl server locally? The scenario is that we have a windows user with a deps.edn project that is having trouble getting a repl started in IntelliJ. I was thinking he could just run a socket REPL and jack in. I see aliases for nrepl as well as socket repl directions Any recommendations besides having an accident and getting a Mac instead?


Should this be the right invocation? clj -Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}"


Got it! From

clj -J-Dclojure.server.jvm="{:port 5555 :accept clojure.core.server/repl}"


a better approach would be to create an alias in the project deps.edn: i'm a cursive user myself and this is how i start a socket repl server in the terminal ( clojure -O:socket ) and connect cursive (a socket repl client) to it by creating a remote socket repl run configuration in intellij idea.


Nice. Thanks! I think 90% of the answers are in Sean Corfield's deps.edn file.


yup, i personally found a lot of gems in there. 🙂