Creating a Web Chat with SignalR, Web Sockets, Angular and Magic

Web Sockets and asynchronous message transmissions over socket connections is probably one of the most difficult tasks you can possibly do in any web application. Hence, to make it manageable, it needs to be simplified, the same way the gearbox in your car is simple to use, even though it probably involves thousands of moving parts. In this article I will walk you through how to create a live chat client using SignalR, Web Sockets and Magic. If you wish to follow the tutorial though, the first thing you'll have to do is to download Magic.

The Angular frontend

First we'll need a frontend. Use the Angular CLI to create a new Angular project and name it "chat". Open a terminal on your development machine and execute the following command in it.