demas demas - 1 year ago 87
Java Question

How to host Clojure services in production

I have a Clojure REST service written in Clojure/Ring/Jetty. In development process I have ran them from command line

lein run serve
, but now I want to run them to production.

What is the correct way to do it ? In the .NET world I am using IIS (Internet Information Server) to host web applications. What do I need to use in the JVM ? Tomcat or any other servlet container ?

Answer Source

Usually, I prefer to run clojure as standalone java applications. You can build an executable jar with lein uberjar. You cal take a look at this tutorial uberjar.

This will build you -standalone.jar. Than if you are in linux environment just run as following nohup java -jar <projectname>-standalone.jar

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download