Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Connect middleware for checking if app is alive or not - optionally via custom condition(s).
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
.gitignore
.travis.yml
MIT-LICENSE
README.textile
TODO
index.js
package.json

README.textile

CONNECT-ALIVE

Connect middleware for checking if app is alive or not – optionally via custom condition(s).

Installation

  $ npm install connect-alive

Usage

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;
    })
  );

Test

  GET /alive?

Notes

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.

License

Released under the MIT license.
Copyright © Jonas Grimfelt, Merchii

Something went wrong with that request. Please try again.