npm

Does your artifact manager get in the way? Join us on Oct. 8 at 10am PT, to discuss how npm can help.Sign up »

duiba-eureka-js-client

2.0.0 • Public • Published

Eureka

NodeJS接入Eureka,基于eureka-js-client封装

Use

npm i duiba-eureka-js-client
const EurekaClient = require('duiba-eureka-js-client');
 
EurekaClient({
  port: 3000, // 端口号
  appName: 'eureka-test', // 应用名称
  services: ['TUIA-ACTIVITY-WEB', 'TUIA-ADVERT-CENTER', 'TUIA-ADVERT-MANAGER'] // 需要调用的服务名称
}).then(Eureka => {
  global.Eureka = Eureka
})
### De-register with Eureka & stop application heartbeats
``` js
global.Eureka.stop();

Get Instances By App ID

const host = global.Eureka.getHost('YOURSERVICE');

Keywords

install

npm i duiba-eureka-js-client

Downloadsweekly downloads

1

version

2.0.0

license

ISC

last publish

collaborators

  • avatar
Report a vulnerability