npm

Need private packages and team management tools?Check out npm Orgs. »

egg-consul

1.0.8 • Public • Published

egg-consul

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-consul --save

Usage

// {app_root}/config/plugin.js
exports.consul = {
  enable: true,
  package: 'egg-consul',
};

Configuration

// {app_root}/config/config.default.js
exports.consul = {
  client: {
    host: {
      ip: '127.0.0.1', // register center ip , default 127.0.0.1
      port: '8500', // register center port, default 8500
      defaults: {, // optional
        token: 'acl token'
      }
    },
    server: {
      name: 'project name', // project name, default project name
      address: '', // service ip, default extranet ip
      port: '', // service port, default service port
      check: {
        path: '' // health check http path
      },
      tags: [] // service tags
    }
  }
};

see config/config.default.js for more detail.

Example

Questions & Suggestions

Please open an issue here.

License

MIT

install

npm i egg-consul

Downloadsweekly downloads

10

version

1.0.8

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability