I'm using https://github.com/seancorfield/clj-new 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 @seancorfieldThat'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.
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 https://nrepl.org/nrepl/usage/server.html as well as socket repl directions https://clojure.org/reference/repl_and_main#_launching_a_socket_server. Any recommendations besides having an accident and getting a Mac instead?
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. 🙂
Should this be the right invocation? clj -Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}"
Got it! From https://oli.me.uk/exploring-repl-tooling-with-prepl/:
clj -J-Dclojure.server.jvm="{:port 5555 :accept clojure.core.server/repl}"