GET and POST handling added to app.js