Updating the server code, supporting socket.io for client communication.