Application Profiles

Contents

  1. Profiles
  2. alternative web servers
  3. databases
  4. miscellaneous

Profiles

Running lein new luminus myapp will create an application using the default profile template. However, if you would like to attach further functionality to your template you can append profile hints for the extended functionality.

alternative web servers

  • +aleph - adds Aleph server support to the project
  • +http-kit - adds HTTP Kit support to the project
  • +immutant - adds the Immutant web server to the project

web server notes

Servers other than Jetty are not supported by the lein-ring plugin. The means that we have to run them using the following command:

lein run

A number can be passed in to specify a custom port:

lein run 8080

To build a runnable jar for production use:

lein uberjar

databases

  • +h2 - adds db.core namespace and H2 db dependencies
  • +postgres - adds db.core namespace and add PostreSQL dependencies
  • +mysql - adds db.core namespace and add MySQL dependencies
  • +mongodb - adds db.core namespace and MongoDB dependencies

miscellaneous

  • +auth - adds Buddy dependency and authentication middleware
  • +cljs - adds ClojureScript support to the project along with an example
  • +cucumber - a profile for cucumber with clj-webdriver
  • +swagger - adds support for Swagger-UI using the compojure-api library
  • +sassc - adds support for SASS/SCSS files using SassC command line compiler

To add a profile simply pass it as an argument after your application name, eg:

lein new luminus myapp +cljs

You can also mix multiple profiles when creating the application, eg:

lein new luminus myapp +cljs +swagger +postgres