Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
.jshintrc
.travis.yml
LICENSE
README.md
index.js
package.json
test.js

README.md

node-nurse

Standardized health check

Usage

var nurse = require('nurse'),
    app = require('express')(),
    server = app.listen(3000);


app.get('/health-check', function(req, res){
    res.send(nurse({'ok': true, 'server': app.server}));
});

This will send back some JSON that look like this:

{
    hostname: "someservice.myapp.com",
    pid: 34437,
    time: "2012-11-06T23:44:13.660Z",
    uptime: 6,
    memory: {
        free: 14770176,
        total: 2147483648,
        rss: 29224960,
        heap: 19622144,
        heap_used: 11072256
    },
    load: {
        1m: 3.16552734375,
        5m: 2.8232421875,
        15m: 2.6494140625
    },
    node_env: "development",
    service_name: "user",
    ok: true,
    server: {
        connections: 2
    }
}

Install

 npm install node-nurse

Testing

git clone
npm install
mocha
Something went wrong with that request. Please try again.