egg-consul-pro
consul plugin for egg.
Install
$ npm i egg-consul-pro
Configuration
egg-consul-pro
support all configurations in consul.
- promisify:
true
=> Cannot Modify
// {app_root}/config/config.default.js // Single Consulexportsconsul = client: host: "127.0.0.1" port: 7888 promisify: true ; // Multi Consulexportsconsul = clients: instance1: host: "127.0.0.1" port: 7888 promisify: true instance2: host: "127.0.0.1" port: 7888 promisify: true ;
Usage
// {app_root}/app.js { thisapp = app; } async { // Single Consul if thisappconsul thisappconsulclient; // consul client thisappconsul; thisappconsul; } moduleexports = AppBootHook;
Questions & Suggestions
Please open an issue here.