Package the Application

Our application is now ready to be packaged and deployed. Let’s see how to accomplish this using Leiningen and go over some of the things to be aware of, depending on how you wish to run the application in production.

Up to this point we’ve been running our application by calling lein run to start up the HTTP server in development mode. In this mode the server watches the files for changes and reloads them as needed. This obviously causes a significant performance hit. Since we should optimize our application for performance when we deploy in production, we’ll need to package it differently. Let’s look at the two most popular ways to run Clojure web applications in production, along with the benefits and the drawbacks ...

Get Web Development with Clojure, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.