switch server to socket.io