This video goes into using the disconnect event.
- [Instructor] Welcome to using the disconnect event.…In the previous video, we looked at broadcasting messages…to everyone but ourselves.…In this video, we're going to tie a few ideas…that we've learned over the last few videos…and sections together.…Now, this is going to involve using a disconnect event,…Redis, and also promises.…So, let's go ahead and get started by looking at the code.…So, first thing we're gonna do is open up package.json…and just look at the packages.…So, here we're gonna have Express, Socket.io…and Redis installed.…
Again, these are just the versions that we are using…and should be current as of the recording of this video.…Now, let's take a look at Redis.…Now, if you've seen the previous section,…this will look very familiar.…With have a config that's gonna connect up to Redis,…we can take a quick look at that.…We can see that it's gonna use this host, this port.…And we have an expire in there.…That's gonna expire after an hour.…
So then, we connect, create a client, and then we have…this promise here, which takes a resolve and reject,…
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