Creating a simple chat room

A basic chat room application is one of the most widely used demos. This shows off Socket.IO or even web sockets in a more general sense. The reason for this is that it immediately gives the business case for Socket.IO in a way that is easy to follow and digest.

Building a basic chat room with Socket.IO is neither terribly difficult or complex. This is the sort of application that Socket.IO was designed for.

When we have completed our chat application, it will look something similar to the following screenshot:

Creating a simple chat room

Getting ready

For this recipe, we will use jQuery for simple DOM manipulation and Bootstrap for styling purposes. ...

Get Socket.IO Cookbook 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.