You are previewing Clojure in Action.

Clojure in Action

Cover of Clojure in Action by Amit Rathore Published by Manning Publications

Chapter 10. Clojure and the web


This chapter covers

  • Creating web services with Clojure
  • An overview of Ring
  • Using Compojure on top of Ring
  • Generating HTML


HTTP is the lingua franca of the internet. If your project involves creating a dynamic website, you’ll need to use a suitable web application framework to get your job done. Even if you aren’t creating a website for end users to visit, writing an HTTP interface to your application can provide an easy-to-use API for other applications. In this chapter, we’ll explore doing that. First, we’ll write some framework code, and then we’ll use some open source libraries to enhance what we wrote. Specifically, after writing our own little framework, we’ll explore the Ring and Compo-jure projects. ...

The best content for your career. Discover unlimited learning on demand for around $1/day.