Naughty Praying Mantis

    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.

    Install

    npm i koa-consul

    DownloadsWeekly Downloads

    7

    Version

    0.0.5

    License

    MIT

    Last publish

    Collaborators

    • zfeng