Skip to content

pesutak/healthcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Healthcheck

npm

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published