Updated app.js for server