MundaneClojureForMortals

Mundane Clojure for Mortals: Building a simple Web API

A while ago I did a small introduction to building a simple REST API with Clojure from scratch at Futurice in Berlin. While preparing that, I did create a small tutorial and demo project to follow along ( GitHub, Tutorial). The presentation was recorded on video and you can check it out right now, right here: [embed]https://vimeo.com/125578412[/embed] Feedback, as well as pull requests are highly appreciated. The tutorial is not complete yet and has some glitches here and there I guess. However, I already got feedback, that I was a good starting point for multiple people without previous Clojure experience. Thanks Nils ...

July 23, 2015 · 1 min · Nils
AngularJS Logo

AngularJS: Send auth token with every request

AngularJS is an awesome javascript framework. With it’s $resource service it is super fast and easy to connect your javascript client to a RESTful API. It comes with some good defaults to create a CRUD interface. However if you are using an API, which needs authentication via an auth token, you might run into issues: The resource factory creates a singleton. If you do not already have an auth token when the factory is called, or if the auth token changes afterwards, you cannot put the auth token as a default request parameter in the factory. ...

July 5, 2012 · 6 min · Nils

CORS API with OAuth2 authentication using Rails and AngularJS

Introduction For my latest project PomodoroEasy I wanted as much decoupling of the web client and the server as possible. So the server only provides a RESTful JSON API to feed the client. All the templating, views and business logic are done clientside. Furthermore I wanted them to be provided on different servers and domains. The client is a single page webapp, which resides as a static project on it’s own server. It is not sent from the Rails API server. ...

June 23, 2012 · 10 min · Nils