ring

mgrbyte 2019-10-09T15:59:03.002600Z

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

seancorfield 2019-10-09T19:38:40.003Z

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

seancorfield 2019-10-09T19:39:16.003800Z

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

seancorfield 2019-10-09T19:39:37.004200Z

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

mgrbyte 2019-10-16T10:05:13.019500Z

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:

seancorfield 2019-10-16T15:44:57.019700Z

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

👍 1
seancorfield 2019-10-09T19:41:00.005800Z

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.