@xclbr/healthcheck

1.0.0 • Public • Published

Healthcheck

[![NPM version][npm-image]][npm-url]

This package contains whole Healthcheck server based on Express and Express middleware which can be used in your application. After deploing you can reach health endpoint at:

http://your-server-name/healthz

Sample return is HTTP Status Code 200 and:

{"status":"OK","uptime":14.8367612}

If you deploy it on non-express application, you can specify listening port via environmet variable HEALTHCHECK_PORT or directly in Healthcheck.Run method.

Usage

in Express application

const express = require('express');
const Healthcheck = require('@xclbr/healthcheck');

const app = express();
app.use(Healthcheck.handler);

in non-express application

const Healthcheck  = require('@xclbr/healthcheck');

Healthcheck.Run(); //default port 80

Package Sidebar

Install

npm i @xclbr/healthcheck

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.1 kB

Total Files

4

Last publish

Collaborators

  • psfixer