Build Your First Web App

In the preceding example we used the default Leiningen template to create a very simple application that has only one 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 different 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 working. We’ll gloss over some of the finer details 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 ...

Get Web Development with Clojure, 3rd 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.