Using SendGrid with Clojure in The Next Web HackBattle24 Apr 2014
This week is The Next Web conference in Amsterdam, where I participated in the HackBattle. Like I did two years ago, I took a project I am currently working on and tried to use one of the HackBattle API partners. Last time I used BrowserChannel and the Rijksmuseum API. The current project I am working on is to complete the Clojure web application story by building a back-end for a TodoMVC ClojureScript front-end. I've integrated SendGrid's Inbound Parse Webhook API to be able to add todos via email.
Using SendGrid you can send an email with your todo to add it to your todo list, when you use your profile name in the subject line. On the server side this was easily implemented by adding a POST handler and setting some DNS settings properly.
To make your emailed todos show up instantaneously, the todo page now also has Server Sent Events for push notifications.
You can try it for yourself at clj-crud.herokuapp.com. The main page includes instructions on how to sign up or log in using one of the demo accounts. Once you're logged in click the "Todos" button in the menu bar to go to the TodoMVC page. There you'll find the instructions on how to add a todo via email.