Asynchronous NodeJS app using AngularJS front-end