Hey everyone π
I just published health-chk, a lightweight, customizable health check middleware for Express.js, perfect for containerized environments like Kubernetes, Docker, and cloud setups (AWS, GCP, etc).
π§ What it does:
Simple GET /healthz endpoint
Reports memory, uptime, CPU, PID, and more
Supports custom async diagnostics (e.g., DB status)
Environment variable output support
Graceful error reporting
Perfect for readiness/liveness probes
app.use(
healthCheck({
path: '/healthz',
info: async () => ({
database: "connected",
service: "auth-service"
}),
includeEnv: true,
envKeys: ['NODE_ENV', 'SERVICE_NAME']
})
);
Install: npm install health-chk
Let me know what you think, happy to hear feedback or PR suggestions!
Top comments (0)