Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Health for your server
// Health page (attribution to dshaw)
var pkg = require('./package.json');
version = pkg.version;
app.get('/health', function (req, res) {
var health = {
'version': pkg.version,
'pid': process.pid,
'memory': process.memoryUsage(),
'uptime': process.uptime()
};
res.send(health);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment