What is the difference between lein run
, lein trampoline run
and deploying a clojure app as uberjar? Is there any performance difference?
If I do a lein run
/lein trampoline run
I can just ssh into the server and pull my changes from git, without needing to restart the app, the same is not true for uberjar. In case of uberjars, for every change I need to build and deploy the app.
Thanks in advance.
All three of them will by default not handle your code changes in real time.
If you are working with ring, then lein-ring has a development mode that can be started this way:
lein ring server
which will indeed to code reloading for you.
EDIT: which one to use in production ?
Assuming here that *production* means delivering a bundled version of your code to a user
Creating a jar with lein uberjar and make your final product independent of the build tool is usually the preferred way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With