Chat server in MEAN stack to understand socket.io library