a template project for the Luminus framework
Clone or download
Latest commit 19f00db Jan 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
resources/leiningen/new/luminus release "3.10.32" Jan 21, 2019
src/leiningen/new update guava for mongo to 27.0.1-jre (#412) Jan 11, 2019
.gitignore bumped up dependencies Sep 6, 2014
CHANGES.md release "3.10.32" Jan 21, 2019
README.md add +sqlite doc to readme (#393) Oct 19, 2018
project.clj release "3.10.32" Jan 21, 2019
publish.sh release "2.9.10.7" Mar 1, 2016

README.md

Luminus-Template

A Leiningen template for projects using Luminus.

The template initializes a base Luminus application.

Requirements

Luminus requires Leiningen version 2.5.3+

Usage

The Luminus template ships out of the box with your latest Leiningen. Run the following command to create a new Luminus project which uses the default profile template:

lein new luminus <your project name>

However, if you would like to attach further functionality to your template you can append profile hints for these extended features:

routing

  • +reitit adds Reitit Clojure/Script router support

alternative servers

  • +aleph adds the Aleph server
  • +http-kit adds the fast HTTP Kit web server to the project
  • +jetty adds the jetty web server to the project

databases

service API

  • +graphql - adds GraphQL support using Lacinia
  • +swagger adds support for Swagger-UI using the compojure-api library
  • +service removes static assets and the layout, adds Swagger support

ClojureScript

misc

  • +boot causes the project to run with Boot instead of Leiningen
  • +auth adds Buddy dependency and authentication middleware
  • +auth-jwe adds Buddy dependency with the JWE backend
  • +oauth adds OAuth dependency
  • +hoplon adds ClojureScript support with Hoplon to the project
  • +cucumber adds support for browser based UI testing with Cucumber and clj-webdriver
  • +sassc adds support for SASS/SCSS files using SassC command line compiler
  • +war adds support of building WAR archives for deployment to servers such as Apache Tomcat (should NOT be used for Immutant apps running on WildFly)
  • +site creates template for site using the specified database (H2 by default) and ClojureScript
  • +kibit add lein-kibit plugin
  • +servlet adds middleware for handling Servlet context

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

lein new luminus myapp +cljs

You can also mix multiple profiles when creating the application, e.g.:

lein new luminus myapp +auth +postgres

To build as a executable Java ARchive (JAR) standalone, run the following command:

lein uberjar

Or if using the +boot profile:

boot uberjar

To run the resulting standalone executable .jar file, do as you would with any other:

user$ java -jar target/myapp.jar
15-Sep-14 16:06:21 APc47d.4f39.65e6.uhn.ca INFO [myapp.handler] -
-=[myapp started successfully]=-
16:06:21.685 INFO  [org.projectodd.wunderboss.web.Web] (main) Registered web context /
15-Sep-14 16:06:21 APc47d.4f39.65e6.uhn.ca INFO [myapp.core] - server started on port: 3002

Performance Testing

The app can be stress tested by running the Apache benchmark command:

ab -c 10 -n 1000 http://127.0.0.1:3000/

The memory and CPU usage can be inspected by running either jconsole or jvisualvm and attaching them to a running Luminus server.

Other Templates

There is also a public comparison chart of the common templates.

License

Copyright © 2016 Dmitri Sotnikov

Distributed under the MIT License.