Add code from old app server (dashboard_frontend.js)
Fix middleware

There is no body method.
Change middlewares

The profile middleware makes sense only in the 'GET /' for now.
The body parser should be properly configured (otherwise it complains)
Parse json instead of urlencoded bodies
Use http.Server to attach socket.io