Book Image

Node.js By Example

Book Image

Node.js By Example

Overview of this book

Table of Contents (18 chapters)
Node.js By Example
About the Author
About the Reviewers

Chapter 10. Adding Real-time Chat

In the previous two chapters, we extended our social network by adding new features to create pages and share posts. In this chapter, we will discuss real-time communication between users in the system. The technology that we are going to use is called WebSockets. The plan for this part of the book is as follows:

  • Getting to know WebSockets

  • Bringing Socket.IO to the project

  • Preparing the UI of the chat area

  • Exchanging messages between the client and the server

  • Sending messages to the user's friends only

  • Customizing the output of the chat