Application Profiles

In many situations you may have to run your application using different configurations. For example, your application might depend on a set of variables such as the port it runs on and the database-connection information. When you run the application locally during development, these variables are likely to be different from those on the production machine.

A common approach for dealing with this problem is to specify the environment variables outside the application and have it read them at runtime. In this section we’ll see how we can read these variables from a Leiningen profile or the system environment.

Leiningen profiles allow managing many aspects of the application, such as dependencies, resource paths, and environment ...

Get Web Development with Clojure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.