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 ...

Get Web Application Development with MEAN 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.