Adding SignalR Library via NPM

Learn to add SignalR library in a JavaScript client using NPM.

We'll cover the following

Previously, we set up the SignalR dependency for JavaScript client by using CDN. You can try this via NPM by follow the given instructions.

SignalR via NPM

As we said earlier, this process is a bit more involved. First, you need to ensure that you have NPM installed on your machine. You can obtain it from its official website.

Note: NPM is already installed on the Educative’s platform.

NPM stands for Node Package Manager. Originally, it was developed as a system of adding external libraries to Node.js applications, which allows you to run JavaScript directly on the host machine rather than just in a browser. This is why Node.js is primarily used to build applications where JavaScript represents both server-side and client-side code.

But since it was first developed, NPM has become much more than just a library management system for Node.js. It appears to be a convenient way of obtaining external dependencies for client-side applications, too. And that is why it became popular with front-end developers who don’t even use Node.js. This is what we will do, too.

Get hands-on with 1200+ tech skills courses.