Health monitoring
health.js updates the interface's server-health indicator.
- health.setup_health()
Start API health monitoring.
A check runs immediately and then every ten seconds. Each request is aborted after two seconds. The element with ID health-monitor receives either the ok or fail class and a corresponding title.
- Throws:
TypeError -- If the health-monitor element is absent when status is set.
- Returns:
void
Example
// HTML: <span id="health-monitor"></span> setup_health();