mod_status for Node
Simple express/connect middleware to provide an "apache-like" /status.html
page.
Installation
npm install mod_status
Usage
var express = status = ; var app = ; app; console;app;
Configuration
url
- The URL to respond to, defaults to/status.html
version
- Show the Node.js version in the output. Default:false
uptime
- Show the uptime of the process in the output: Default:false
text
- Provide custom response text, will override all the above. Default:null
check
- A function to check the request to see if the status page should be shown. Default:returns true to always show
Example Output
OK
- DefaultOK - NodeJS: v0.10.17
- Fromversion: true
OK - Uptime: 2 days, 3 hours, 4 minutes
- Fromuptime: true
OK - NodeJSL v0.10.17 - Uptime: 2 days, 3 hours, 4 minutes
- Fromuptime: true & version: true
WORKS
- Fromtext: 'WORKS'