Update app.js

Updated to work with socket.io
Merge pull request #1 from tranv94/patch-1

Update app.js