【文件属性】:
文件名称:rstart:NodeJS 健康检查器
文件大小:4KB
文件格式:ZIP
更新时间:2021-06-10 13:19:21
JavaScript
启动
NodeJS 健康检查器
它有什么作用?
r 开始检查 url 在您定义的时间段内是否可用。 如果 http 响应代码不是 200,它会执行 bash 命令,例如重新启动 nodejs 服务器,等等。
例子
var rstart = require('rstart');
var checker = new rstart("http://127.0.0.1:31000/", "ls", "* * * * * *");
// \/ if you don't want wait to check use \/
// checker.check();
// receive the response
checker.on('response', function(response, stdout) {
// do anything with the response and stdou
【文件预览】:
rstart-master
----.gitignore(526B)
----README.md(1KB)
----test()
--------index.js(530B)
----LICENSE(1KB)
----package.json(717B)
----index.js(2KB)