Implementing SignalR
Let’s briefly recap how our healthcheck.client
and HealthCheck.Server
projects currently work:
- The
healthcheck.client
Angular app features a component—theHealthCheckComponent
—that, right after being loaded, performs a call to the server-side/health
endpoint. - The above endpoint is handled by the
HealthCheckMiddleware
: when called, theHealthCheck.Server
ASP.NET Core Web API is configured to launch various ICMP health checks, each one configured to ping a hostname or IP address and return its status (healthy or unhealthy). - The health checks’ statuses are wrapped together by the
HealthCheckMiddleware
and sent in a single JSON response. - The Angular app fetches the JSON response and uses it to create an HTML table, thus showing the result in a readable format.
As we can see, the only interaction between the two projects is a single HTTP call issued to the /health
endpoint: right after the first health...