update server script for socket.io