1.0.4 • Published 6 years ago

@shortlyster/its-alive v1.0.4

Weekly downloads
79
License
MIT
Repository
github
Last release
6 years ago

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.

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago