代码拉取完成,页面将自动刷新
Simple express/connect middleware to provide a status page with following details of the nodejs host.
This module reads the above data from a unix socket generated from the npm module process-watcher. For more details on process-watcher, please refer https://github.com/yahoo/process-watcher.
This module is recommended to be used only in a cluster environment. Also this module is designed to work together with monitr (https://github.com/yahoo/monitr) and process-watcher. For an example of them working together please check examples/sample_cluster.js.
npm install mod_statuspage
var express = require('express'),
status = require('../lib/index.js');
var app = express();
app.use(status({
url: '/status',
check: function(req) {
if (req.something == false) {
return false; //Don't show status
}
return true; //Show status
},
responseContentType : 'html'
}));
console.log('Go to: http://127.0.0.1:8000/status');
app.listen(8000);
url
- The URL to respond to, defaults to /status
check
- A function to check the request to see if the status page should be shown. Default: returns true to always show
responseContentType
- The Content-Type of the Response, can be html or json, defaults to html
ejsTemplate
- EJS Template file for html rendering if responseContentType is html, defaults to status.ejs
bundled with the modulesocketPath
- The socket path written by watchr, defaults to /tmp/watcher.sock
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。