Testing it all
It’s finally time to test all we have done so far.
Launch the two projects in Debug mode and, from the Angular app, navigate to the HealthCheckComponent
. We should see no UI differences up to this point since we’re still performing the initial HTTP call to fetch the health check data. However, if we take a look at the browser’s console, we can already see the console.log
entries showing that the connection with the Hub has been established successfully, as shown in the following screenshot:
Figure 14.1: SignalR connection started
That wss://
prefix at the beginning of the URL indicates that the Angular SignalR library established the connection using the WebSocket protocol, meaning that the changes we made to our Angular proxy are working as expected.
Now we can test that the server-initiated update works as expected. To do that, open a different browser (or tab) and navigate to the following URLs:
https://localhost:40443...