Adds the js functions and prepares the app.js file for sockets