Skip to content

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

License

Notifications You must be signed in to change notification settings

grimen/connect-alive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published