express/connect 中间件 node-mod_status
- 授权协议: BSD
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/yahoo/node-mod_status
- 官方下载: https://github.com/yahoo/node-mod_status
软件介绍
mod_status for Node 是简单的 express/connect 中间件,提供 "apache-like" /status.html 页面。
安装
npm install mod_status
使用
var express = require('express'),
status = require('../lib/index.js');
var app = express();
app.use(status({
url: '/status',
version: true,
uptime: true,
check: function(req) {
if (req.something == false) {
return false; //Don't show status
}
return true; //Show status
}
}));
console.log('Go to: http://127.0.0.1:8000/status');
app.listen(8000);
