Following the book's example of implementing a chatroom using nodejs