Chapter 6Writing RESTful Web Services
In the last chapter, we saw how we can leverage ClojureScript on the client to handle the UI state. This allowed us to refactor our server-side code into stateless service operations. However, our services were declared in ad-hoc fashion using an arbitrary convention. While this approach works fine for small applications, it doesn’t scale well for situations where we have many service operations and many common concerns, such as authentication, that are shared between them. In this chapter we’ll cover how to use a library called compojure-api to provide some structure for our service end points.[55]
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.