Home > connect-alive

connect-alive

Connect-alive is a project mainly written in ..., based on the MIT license.

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

h1. CONNECT-ALIVE "!https://secure.travis-ci.org/merchii/connect-alive.png!":http://travis-ci.org/merchii/connect-alive

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

h2. Installation

  $ npm install connect-alive

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

);

h2. Test

  GET /alive?

h2. Notes

This gem was developed for our own requirements at "Merchii":http://github.com/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.

h2. License

Released under the MIT license. Copyright (c) "Jonas Grimfelt":http://github.com/grimen, "Merchii":http://github.com/merchii

Previous:GitHubDemo