O'Reilly logo

Web Development with Clojure by Dmitri Sotnikov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Application Templates

Once we create a particular type of application, such as our picture-gallery app, we may want to write other similar applications that use the same structure. It would be nice to be able to create a skeleton application template that could be used for this task. This is precisely what we can do by creating Leiningen templates.

Throughout this book we’ve been using the compojure-app template when we created new projects. Here we’ll cover how this template works and how to make templates of our own.[64]

Leiningen uses the lein-newnew plug-in for template creation. To create a new template we merely have to run lein new template <template name>.[65]

Let’s look inside the compojure-app template project to see ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required