2.0.0-rc.4 • Published 6 days ago

node-healthz v2.0.0-rc.4

Weekly downloads
2,413
License
MIT
Repository
github
Last release
6 days ago

node-healthz

HTML Preview

The "health-checkup" npm package simplifies the process of implementing health checks in Node.js applications, allowing you to ensure the reliability and availability of your system components effortlessly.

import { check } from 'node-healthz'
check({
  checks: [
    {
      id: 'PostgreSQL',
      required: true,
      fn: async () => /* ... */,
    },
    {
      id: 'Redis',
      fn: async () => /* ... */,
    },
  ],
})
curl http://localhost:46461/healthz --verbose | jq
< HTTP/1.1 200 OK
{
  "status": "OK",
  "checks": [
    {
      "id": "PostgreSQL",
      "required": "true",
      "t": "1,003ms",
      "output": "<masked>"
    },
    {
      "id": "Redis",
      "required": "false",
      "t": "11ms",
      "output": "<masked>"
    }
  ]
}

Guides