Socket
Socket
Sign inDemoInstall

connect-alive

Package Overview
Dependencies
12
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    connect-alive

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


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
230 kB
Created
Weekly downloads
 

Readme

Source

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 (not yet)

  $ npm install connect-alive

h2. Usage

Minimal:

  connect.createServer(
    connect.alive()
  );

Advanced:

  connect.createServer(
    connect.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

Keywords

FAQs

Last updated on 29 Oct 2011

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc