Based on http://scotch.io/tutorials/javascript/creating-a-single-page-todo-app-with-node-and-angular