komg-hc
v1.0.5
Published
komg health check on target client
Downloads
2
Readme
komg-hc
komg healthy check.
Install
npm i komg-hc -S
Usage
const { createServer } = require('http');
const server = createServer();
const port = 3000;
server.listen(port);
server.on('error', err => {
console.error(err);
});
server.on('listening', () => {
console.log(`env:${process.env.NODE_ENV},listening on ${port} ..`);
});
require('komg-hc')
.reserve(env === 'prod' ? 'redis://172.0.0.1:6379/0' : 'redis://127.0.0.1:6379/0')
.check(server);
module.exports = server;