health-monitor-node 1.1.3
Install from the command line:
Learn more about npm packages
$ npm install @codelittinc/health-monitor-node@1.1.3
Install via package.json:
"@codelittinc/health-monitor-node": "1.1.3"
About this version
Set the environment variables for your project:
setup your environment
LOG_ENV=dev|qa|prod
setup your host
LOG_HOST=<YOUR HOST URL>
import withHealthMonitor from '@codelittinc/health-monitor-node'
// option 1
withHealthMonitor(app);
// option 2
withHealthMonitor(app, (req, res) => {
try {
// load something from the database to test the connection, execute a GraphQL query, or anything you want to verify;
res.sendStatus(200);
} catch (err) {
res.status(500).json({ message: err.message });
}
});
Details
- health-monitor-node
- codelittinc
- about 3 years ago
- ISC
- 3 dependencies
Assets
- health-monitor-node-1.1.3-npm.tgz
Download activity
- Total downloads 3,574
- Last 30 days 0
- Last week 0
- Today 0