express-healthz
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -13,3 +13,3 @@ 'use strict'; | ||
var healthz = exports.healthz = function healthz(req, res, next) { | ||
req.method === 'GET' && req.path === '/health' ? res.status(200).end() : next(); | ||
['/health', '/healthz'].indexOf(req.path.toLowerCase()) >= 0 && ['get', 'head'].indexOf(req.method.toLowerCase()) >= 0 ? res.status(200).end() : next(); | ||
}; | ||
@@ -16,0 +16,0 @@ |
{ | ||
"name": "express-healthz", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Health check middleware for Express", | ||
@@ -22,3 +22,3 @@ "author": "Joel Wallis Jucá <joelwallis@gmail.com>", | ||
"watch": "babel -w src/index.js -o index.js", | ||
"prepublishOnly": "for s in lint build; do npm run $s; done", | ||
"prepublishOnly": "for s in lint test build; do npm run $s; done", | ||
"postpublish": "rm index.js", | ||
@@ -31,3 +31,5 @@ "lint": "standard --verbose", | ||
"babel-cli": "^6.26.0", | ||
"babel-preset-env": "^1.7.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-es2016": "^6.24.1", | ||
"babel-preset-es2017": "^6.24.1", | ||
"babel-register": "^6.26.0", | ||
@@ -34,0 +36,0 @@ "chai": "^4.1.2", |
@@ -5,2 +5,5 @@ # express-healthz | ||
[](https://travis-ci.org/joelwallis/express-healthz) | ||
[](https://snyk.io/test/github/joelwallis/express-healthz?targetFile=package.json) | ||
## Usage | ||
@@ -7,0 +10,0 @@ |
3006
29
10