API Reference

We have set up a little javascript demo client for you to kick off development.

👉 Download javascript demo client

The javascript SignalR client supports two use-cases: server-side program via nodejs or webpage running in the browser. We have provided a sample for each situation.

Server-side client

Make sure you have installed nodejs 16 or later and npm 7 or later.
In order to run the server-side app, first you need to download the needed packages. Open a command prompt window in the demo folder and run npm:

c:\...\demo>npm ci

Then you can run index.js via node (the client requires two command line arguments, -u url to the api server and -k api key):

c:\...\demo>node index.js -u https://api.pickup.bd.com -k dev

If everything ok, you should see "SignalR Connected".

636

nodejs sample screenshot

If you call the Web API with the same api key, you should see a notification in the terminal window.

Browser client

Open the index.html file in the demo.browser folder and enter the api endpoint https://api.pickup.bd.com and your api key in the textboxes, then click connect. You should see "SignalR Connected" in the webpage.

If you call the Web API with the same api key, you should see a notification in the webpage.