Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TakenPilot committed Dec 12, 2015
1 parent e7e4264 commit 7423f75
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
Health Check
=======

Include in all Node projects
Health-check middleware for Express.

Returns either HTTP 200 or 500.

Features
- Fetches fields asynchronously (in parallel)
- Supports Promises
- Reports errors individually
- Custom and optional (non-failing) fields

## Usage

Expand Down Expand Up @@ -70,10 +78,9 @@ var express = require('express'),
express.use(healthCheck({
stats: {
searchExists: function () {
var search = require('./search'),
client = search && search.getInstance();
var searchService = require('./search');

return client.ping();
return searchService && searchService.ping();
}
}
}));
Expand Down

0 comments on commit 7423f75

Please sign in to comment.