2.1.7 • Published 5 years ago

ct-register-microservice-node v2.1.7

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

Control Tower microservice utility for Nodejs applications

Library to register and integrate microservice in the Control Tower API gateway. This library implement the /info and /ping endpoints that Control Tower uses to obtain info of the registered microservices and check live.

Supports Koa 2.x and 1.x frameworks.

Install

npm install --save ct-register-microservice-node

Use in microservice

In the listen callback of your Koa application, add the following code snippet:

    const promise = require('ct-register-microservice-node').register({
        info: info,
        swagger: swagger,
        logger: logger, 
        app: app,
        mode: 'auto',
        framework: ctRegisterMicroservice.KOA2,
        token: '<your control tower token>',
        ctUrl: '<your control tower instance URL>'
    });
    p.then(function() {}, function(err) {
        logger.error(err);
        process.exit(1);
    });

TODO

  • Properly document config options
2.1.7

5 years ago

2.1.6

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.1

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

8 years ago