added socket.io for async communication between server and frontend.