leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
Yehonathan Sharvit 2020-12-20T13:12:11.128300Z

A question about the proper way to run a service on production. Which one is better: lein run or lein uberjar then java ...

2020-12-21T18:29:03.132Z

if you jump through enough hoops (using trampoline so you're not running an extra VM, using the right java system property settings) it almost works, but there's zero benefit

2020-12-21T18:29:19.132200Z

I guess "the server does the same thing I do locally" is almost a benefit

alexmiller 2020-12-21T19:17:08.132400Z

seems worth it to me solely to remove the risk of a code base that's not yours in the startup path

2020-12-21T19:59:20.132600Z

yeah, not using a build tool on prod is a no brainer

Yehonathan Sharvit 2020-12-20T13:12:18.128600Z

What are the pros and cons?

jumar 2020-12-20T14:30:15.129900Z

Bo need to install leiningen on production - build an uberjar and use java to run it

2020-12-20T14:33:32.130100Z

If lein uberjar is done on dev machine, and only java ... is done on production machine, then Leiningen doesn't need to be on production machines at all.

2020-12-20T14:34:48.130300Z

lein run on production machines opens you up to the possibility that production machines need to connect to Maven central, Clojars, etc. sites to download code, which could fail. If there are any SNAPSHOT versions anywhere in the dependency tree, it opens you up to the possibility of different production machines getting different versions of code at different times.

2020-12-20T14:35:51.130500Z

The only con I can think of to using lein uberjar on production machines is whatever steps you take to get that working, which in many cases I suspect is pretty quick.

alexmiller 2020-12-20T16:52:30.131800Z

Using lein to start a production instance seems deeply weird to me (even though it is apparently very common)