https://github.com/nodecloud/koa-consul
The koa middleware for consul health check.
https://github.com/nodecloud/koa-consul
consul health-check koa2 middleware
Last synced: 7 months ago
JSON representation
The koa middleware for consul health check.
- Host: GitHub
- URL: https://github.com/nodecloud/koa-consul
- Owner: nodecloud
- Created: 2017-04-23T13:55:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-11T06:12:43.000Z (over 8 years ago)
- Last Synced: 2025-02-26T05:33:33.032Z (11 months ago)
- Topics: consul, health-check, koa2, middleware
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# koa-consul
This middleware will set a /health route as default. The consul server will visit /health for acquiring system info and check the service's health status.
## Usage
``` javascript
import Koa from 'koa';
import KoaConsul from 'koa-consul';
let app = new Koa();
app.use(KoaConsul());
```
## API
### KoaConsul(options)
* options.url
* options.getInfo: a callback function, if you want custom the /health api's response, please implement this function.