Adding socket.io code to server and client js