Simple RESTful web service kata using Pedestal and Clojure.
The service implements a small social service, allowing users to post messages. Other users can then like or comment on existing messages. Users can look up messages by which ones were posted most recently or which ones are most popular. The possibility of location-based searching was also laid out, but not all endpoints were implemented within the time constraints.
The service stores all messages in-memory as an atom. This means that stopping the service loses all messages, and restarting creates a fresh instance.
Enumeration of the endpoints supported by this service. At this time, not all of these endpoints are active.
Just returns the string "Message!".
curl 'http://localhost:8080'
Get a list of all the messages which have been posted into the service.
curl 'http://localhost:8080/messages
Get details of an individual message by its ID.
I created this as a one-day (about 5–6 hours) kata which was conceived as a possible hiring challenge. For me, it was a crash course in Pedestal, as I only knew of Pedestal's existence prior to diving into this project. As a result, I spent a good hour or so just reading documentation before coding. I was working against a list of requirements, which is why a number of endpoints are stubbed out but not implemented.
Prior to this challenge, I had never implemented a RESTful service from scratch. I had worked on a number of preexisting services, but the API decisions had been laid out already for those.