@shortlyster/its-alive
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

It's Alive Middleare

The standard express middleware for @shortlyster apps to perform readiness and liveness checks

Usage

npm add @shortlyster/its-alive
yarn add @shortlyster/its-alive
import * as express from 'express';
import * as itsAlive from '@shortlyster/its-alive';

const app = express();

app.use(itsAlive());

This will make the app to respond to the following routes:

GET /_health/ready -> 200 OK
GET /_health/alive -> 200 OK

Dynamic Checks

one can specify application specific dynamic checks by passing in the following options:

app.use(itsAlive({
  readyWhen: () => something(),
  aliveWhen: () => something()
}));

Promises are totes supported:

Copyright & License

All code in this repository released under the terms of the MIT license.

Copyright (C) 2017 Shortlyster Pty Ltd.

Readme

Keywords

none

Package Sidebar

Install

npm i @shortlyster/its-alive

Weekly Downloads

21

Version

1.0.4

License

MIT

Last publish

Collaborators