Learn how to use rooms in an application.
- [Joshua] Welcome to the video,…Create a Simple Rooms Application.…In the previous video, we learned about namespaces…and how they are different than rooms.…In this video, we're gonna take a look…at using rooms in more depth.…The previous video on rooms…really just introduced the concept.…Here, we will see all the rooms for a socket,…how to leave rooms, and how to broadcast to rooms.…We will do this by creating an application,…so let's look at the code right away.…First, let's look at package.json.…
As we can see, this is just expressed in socket.im,…just like all the others.…Now, let's look at the socket.io server in index.…Again, we have the boiler plate, just like every other video…and the key information here is in the connection event.…So, let's look at this.…Here, we're gonna listen for a room.join event,…and then from there, we're gonna go ahead…and try and join a room.…We're gonna get a room name parsed in from the client,…but before we do that, we're gonna log all the rooms,…so off the socket, there is an object named Rooms…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Using Redis
- Structures, channels, and subscribing
- Adding messaging
- Integrating Redis and Node.js
- Working with geospacial indexes
- Using Node.js with Socket.IO
- Working with rooms
- Creating namespaces
- Using Socket.IO and Express
- Sharing states
- Using routes
Skill Level Intermediate
Node.js: Build Your First Microservicewith Daniel Khan2h 9m Intermediate
RESTful Web API Design with Node.jswith Saleh Hamadeh2h 35m Intermediate
Building a Website with Node.js and Express.jswith Ray Villalobos3h 16m Intermediate
1. Using Redis
2. Redis Messaging
3. Integrating Redis and Node.js
4. Using Node.js and Socket.IO
5. Using Rooms and Namespaces in Socket.IO
6. Using Socket.IO and Express
Out of process messaging8m 20s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.