Chapter 13. Building an Advanced Chat App

In the previous chapter, we developed a rudimentary chat application, which allowed an arbitrary number of users to connect to each other and talk anonymously.

In this chapter, we are going to expand this app and make it more advanced by adding features for chat rooms and notifications. In doing so, we will demonstrate how the concept of namespacing works on socket.io, which is one of the most important aspects of this library.

We need some room!

So far, the most advanced thing that we have done with WebSockets in our apps has simply been sending data back and forth across a single WebSocket interface. We paid very little attention to partitioning and basically just let it all go on as a free-for-all app. ...

Get Learning Node.js for Mobile Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.