node-healthz
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

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

/node-healthz/

    Package Sidebar

    Install

    npm i node-healthz

    Weekly Downloads

    139

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    11.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • smoliji