Update app.js

Updated to work with socket.io