In this recipe, you will see how to join a room and broadcast a message to all clients connected to that specific room. Before you start, create a new package.json file with the following content:
{ "dependencies": { "socket.io": "2.1.0" } }
Then, install the dependencies by opening a terminal and running:
npm install