Learn how to use Socket.IO events and Express routes together.
- [Voiceover] Welcome to "Using routes…with Socket.io and Express"…In the previous video,…we covered the problem that we will solve in this video.…So we are gonna do that in this video,…by covering what we need to do in Socket.io…to make it work with Express routes so that we can map,…or as close as we can,…we can map routes to namespaces.…So let's go ahead and get started.…Now because we're continuing from the last video…and we had some code, and we're gonna talk about…matching Socket.io to Express routes.…
So we'll just build on this.…So we're gonna go back to "index.js"…So the first thing that we should notice is that…there is now a require for "sockets.js"…This will hold the socket js namespaces.…Let's take a look at that right now.…The first thing we probably notice are these generators.…So these will actually just output scores in order.…Now technically, we shouldn't really look at this…as something we need to do when Socket.io in Express.…
This is really just an implementation detail.…If we're really gonna do this in real life,…
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
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.