Server side code for ERApp, Server made in Node.js