An open API service indexing awesome lists of open source software.

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.

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.