Real-Time Web Apps with Socket.io

In this chapter, you're going to learn about Socket.io and WebSockets, which enable two-way communication between the server and the client. This means that we're not only going to be setting up a Node server, but also a client. This client could be a web app, an iPhone app, or an Android app. For this book, the client will be a web app. This means that we're going to be connecting the two, allowing data to flow seamlessly from the browser to the server and from the server to the browser.

Now, our todo app data can only flow in one direction, and the client has to initialize the request. With Socket.io, we're going to be able to send data back and forth instantly. This means that for real-time apps, such ...

Get Advanced Node.js 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.