Fork me on GitHub
#ring
<
2019-10-09
>
mgrbyte15:10:03

Hi! does anyone know if there an equivilent to lein ring for CLI tools ?

seancorfield19:10:40

I never used lein ring back when I was using Leiningen anyway.

seancorfield19:10:16

I just start my HTTP server in my -main function and used to lein run -- which is now clojure -m my.entry.point

seancorfield19:10:37

@mgrbyte What do you actually rely on lein ring for?

mgrbyte10:10:13

Hi, sorry for the delay in reply (long weekend away). Using lein ring for starting a ring service (jetty-adapter under the hood i guess), with the init and handler hooks (creating the db connection in init). Currently using mount. I'm guessing I could remove the use of lein ring just by doing mount/start before jetty-adapter in main, then handling db connectivity in some mw :thinking_face:

seancorfield15:10:57

That sounds simpler -- less "magic" via plugins.

👍 4
seancorfield19:10:00

We use Component anyway so our HTTP server is wrapped up with a start / stop lifecycle anyway, which makes it really easy to work with from the REPL.