node-mod_statusexpress/connect 中间件
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);
评论