moving app.js to server.js