We can send data to everyone, but what if we want to send data to a specific user? Let’s add a chatroom to our application.
- [Narrator] Welcome back.…Last time, we added a commenting system using socket.io.…In this video, we're going to continue looking at socket.io…and our topic for this video…will be scoping data to individual users.…We'll be adding a mechanism…that allows us to sends messages to specific users…based on their username.…To do this, we'll be using socket.io's room functionality,…which makes message scoping very easy.…As this is a new piece of functionality,…we need to register a new route with our application.…
First, we require routes and chat.…Then, we (mumbles) this module at /chat.…We also need to create the route and views for this route…to edit routes/chat.js.…All this does is at /chat, it renders the chat view.…
To start, author Michael Heap creates a new Express application, showing how to configure it and increase application visibility with logs. Explore Express along with various libraries that will help improve your development experience. Then take a look at technologies such as SSL and nginx, and work through deploying your application to production in a secure and scalable way. Michael also introduces some existing open-source Express projects and reviews how they are structured, to help you organize your own applications in a systematic way. By the end of the course, you'll be familiar with a wide range of new Express tools and libraries, all of which will help you deliver the best value to your customers.
- Consuming an API
- Showing results on a webpage
- Caching requests in memory
- Refactoring for testing
- Mocking to remove dependencies
- Spying with Sinon.JS
- Sending and receiving data in real time
- Mounting subapplications
- Serving content conditionally for AJAX
- Securing your app
- Improving performance
- Examining large-scale Express apps: Ghost.org and Balloons.IO