Socket
Book a DemoInstallSign in
Socket

@restorecommerce/koa-health-check

Package Overview
Dependencies
Maintainers
5
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@restorecommerce/koa-health-check

Koa 2 middleware for Cloud Health

latest
Source
npmnpm
Version
1.0.11
Version published
Weekly downloads
430
83.76%
Maintainers
5
Weekly downloads
 
Created
Source

Koa Health Check

VersionBuild StatusDependenciesCoverage Status

Cloud Health Connect provides a Koa Middleware based on Cloud Health. The following endpoints are provided to monitor services and applications on Kubernetes:

  • Health Endpoint
  • Liveness Endpoint
  • Readiness Endpoint

Usage

import * as Koa from 'koa';
import * as health from '@cloudnative/health';
import { HealthEndpoint, ReadinessEndpoint, LivenessEndpoint } from 'koa-health-check';

const healthcheck = new health.HealthChecker();
const koa = new Koa();

koa.all('/live', LivenessEndpoint(healthcheck));
koa.all('/ready', ReadinessEndpoint(healthcheck));
koa.all('/health', HealthEndpoint(healthcheck));

Status Responses

Cloud Health StatusReadiness Status CodeLiveness Status CodeCombined Health Status Code
STARTING503 UNAVAILABLE200 OK503 UNAVAILABLE
UP200 OK200 OK200 OK
DOWN503 UNAVAILABLE503 UNAVAILABLE503 UNAVAILABLE
STOPPING503 UNAVAILABLE503 UNAVAILABLE503 UNAVAILABLE
STOPPED503 UNAVAILABLE503 UNAVAILABLE503 UNAVAILABLE
-500 SERVER ERROR500 SERVER ERROR500 SERVER ERROR

Development

To build the library, use npm run build command.

To run the tests, use npm run test command.

Keywords

koa

FAQs

Package last updated on 17 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts