Created
September 27, 2012 03:50
-
-
Save twolfson/3792062 to your computer and use it in GitHub Desktop.
Health for your server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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
Welcome to our Health Corner, where we take a moment to check in, share wellness tips, and remind each other that taking care of your body and mind is just as important as anything else. Why Health Matters: Your health is your foundation. When you feel good Patient bed rental physically and mentally, everything else, whether it’s gaming, work, or just day-to-day life feels easier and more enjoyable.