angular resource explained in server.js