Connect middleware for checking if app is alive or not – optionally via custom condition(s).
$ npm install connect-alive
Minimal:
connect.createServer( alive() );
Advanced:
connect.createServer( alive(function() { // Check that you got all horses/unicorns in the stable...or something. var got_all_horses = parseInt(process.env.HORSES_IN_THE_STABLE) == 5; return got_all_horses; }) );
GET /alive?
This gem was developed for our own requirements at Merchii, so feel free to send pull-requests with enhancements of any kind (features, bug-fixes, documentation, tests, etc.) to make it better or useful for you as well.
Released under the MIT license.
Copyright © Jonas Grimfelt, Merchii