Express status-page solution used at Studio Hyperdrive
# NPM
npm install --save @studiohyperdrive/express-status
# Yarn
yarn add --save @studiohyperdrive/express-status
import { ExpressStatusRouter } from '@studiohyperdrive/express-status';
...
// Exposes '/status' in the router.
app.use(ExpressStatusRouter);
An Express Router that exposes GET /status
.
Usage:
import { ExpressStatusRouter } from '@studiohyperdrive/express-status';
...
app.use(ExpressStatusRouter);
The controller that takes care of handling the route callback. Using the controller gives you the flexibility of adding your own endpoint.
Usage:
import { ExpressStatusController } from '@studiohyperdrive/express-status';
...
const expressStatusController = new ExpressStatusController();
router.route('/status').get(expressStatusController.get);