Basic chat server in node & mongodb to understand socket.io library