Build Your First Web App

In the preceding example we created a very simple application that has only a single dependency: the Clojure runtime. If you used this as the base for a web application, then you’d have to write a lot of boilerplate to get it up and running. Let’s see how we can use a Leiningen template to create a web-application project with all the boilerplate already set up.

Our primary goal here is to get a high-level understanding of the project structure and get something done. I’ll gloss over some of the finer details in order to maintain our momentum. Don’t worry if you don’t fully understand all the steps at this point. We’ll get into the details in subsequent chapters.

Creating an Application from a Template

A template ...

Get Web Development with Clojure, 2nd Edition 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.