This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-14
Channels
- # adventofcode (12)
- # aleph (8)
- # announcements (6)
- # babashka (16)
- # beginners (217)
- # biff (7)
- # calva (30)
- # chlorine-clover (4)
- # cider (3)
- # clj-kondo (15)
- # cljdoc (6)
- # clojure (50)
- # clojure-europe (86)
- # clojure-finland (2)
- # clojure-nl (1)
- # clojure-norway (37)
- # clojure-uk (2)
- # clojurescript (8)
- # cursive (10)
- # datomic (13)
- # emacs (1)
- # fulcro (41)
- # helix (1)
- # humbleui (2)
- # joyride (7)
- # juxt (4)
- # lsp (19)
- # off-topic (47)
- # pathom (14)
- # polylith (5)
- # portal (7)
- # reagent (10)
- # releases (4)
- # sci (1)
- # scittle (18)
- # shadow-cljs (54)
- # test-check (2)
- # tools-deps (28)
Hey. Thanks for babashka. It gets better each time I pick it up! I'm running it as a long running process with an http-kit server, and would like it to serve up an nrepl server based on a CLI switch. Is this possible? I've tried to do the same calls that bb nrepl-server
does, but those namespaces don't seem to be available at runtime. Any advice?
@kipz There is a babashka.nrepl.server
namespace available with start-server!
and stop-server!
$ bb -e "(babashka.nrepl.server/start-server\!) (deref (promise))"
Started nREPL server at 0.0.0.0:1667
Amazing. Thanks. I was looking at https://github.com/babashka/babashka.nrepl/blob/master/src/babashka/nrepl/server.clj and didn't know how to create a context that worked, but we don't need one!
So this is already partially applied and altered with an appropriate context or something I guess
We should document this somewhere, probably http://book.babashka.org - PR welcome. Yes, the ctx is partially applied
@U04V15CAJ What do you all mean here in “partially applied”?
This is the exposed function you see in bb: https://github.com/babashka/babashka/blob/759d977879c54b378b4aa5290d9e370f3f475d68/src/babashka/impl/nrepl_server.clj#L9-L18