Update app.js

implementing websockets