koa-consul

0.0.5 • Public • Published

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

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.

Package Sidebar

Install

npm i koa-consul

Weekly Downloads

2

Version

0.0.5

License

MIT

Last publish

Collaborators

  • zfeng