Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Building web applications with Clojure - code

This repository contains source codes for the Building web applications with Clojure screencast, published by PacktPub.

Please note, that this code is provided for demonstrational purposes only and was written live during short videos. Therefore, it is kind of pointless to use it without commentary provided in the video course itself.

Each video has a separate git tag for version of code available at the end of it, so you can walk through the progress of the tutorials or jump to the one you're currently browsing.

For example, video 2 of section 3, is tagged as SECTION3_VIDEO2, which video 1 of section 5 is tagged as SECTION5_VIDEO1.

Each section and video is described below, so you can easily browse the code and access external links to tools and libraries mentioned in each video.

Feel free to fork and play around with this repo!

Section 1: Getting Started

In this section, the reader will learn how to create a Leiningen project, configure Ring dependencies and plugins and start the web server from a command line.

Reference links:


Section 2: Ring Handlers

This section will explain how handlers in Ring work, what do they do and how we can access HTTP request manipulate an HTTP response. We will also see how to dispatch calls to different functions and introduce general mechanisms.

Reference links:


Section 3: Middleware

In this section, I will explain how Ring middleware works. Then, I will implement an example middleware. Finally, use of existing middleware will be shown.

Reference links:


Section 4: Forms & sessions handling

In this section, I will show to handle POST/GET parameters from Clojure web application, generate HTML content from Clojure level, manipulate cookies and manage Ring sessions.

Reference links:


Section 5: Building RESTful API

This section will show how we can easily build a RESTful, JSON-based API with Clojure/Ring.

Reference links:


Section 6: Database connectivity

In this section, I will showcase how can we integrate a popular databases - PostgreSQL and MongoDB with Clojure web app. For PostgreSQL, popular Clojure ORM framework - Korma, will be introduced.

Reference links:


Section 7: ClojureScript

This section will cover how to build basic ClojureScript logic, access JavaScript functions and how to integrate it with Clojure RESTful interface server-side.

Reference links:


Section 8: Useful web libraries in Clojure

In this section, I will show most popular and useful web libraries available for Clojure - Compojure for routing, Hiccup and Enlive for HTML templating and Liberator for building RESTful APIs.

Reference links:



No description, website, or topics provided.






No packages published