微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

node-mod_status 安装使用 express/connect 中间件

程序名称:node-mod_status 安装使用

授权协议: BSD

操作系统: 跨平台

开发语言: JavaScript

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);

node-mod_status 安装使用 官网

https://github.com/yahoo/node-mod_status

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐