O'Reilly logo

Web Application Development with MEAN by Robert Onodi, Adrian Mejia, Amos Q. Haviv

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Backend chat service

So far, we've only scratched the surface of our backend application. We are going to add a service layer to our server. This abstraction layer will implement all the business logic, such as instant messaging. The service layer will handle interaction with other application modules and layers.

As for the WebSockets part of the application, we are going to use socketIO, which is a real-time communication engine. They have a really neat chat application example. If you haven't heard of it, you can take a look at the following link:

http://socket.io/get-started/chat/

Chat service implementation

Now that we are familiar with socketIO, we can continue and implement our chat service. We are going to start by creating a new file called ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required