refactored server.js -> app.js