@tuia/eureka-js-client

0.1.0 • Public • Published

Eureka

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

Use

yarn add @tuia/eureka-js-client
const eureka = require('@tuia/eureka-js-client');

eureka({
  port: 3000, // 端口号
  appName: 'eureka-test', // 应用名称
  services: ['TUIA-ACTIVITY-WEB', 'TUIA-ADVERT-CENTER', 'TUIA-ADVERT-MANAGER'] // 需要调用的服务名称
}).then(eureka => {
  // eureka注册完成回调,返回eureka实例
})
### De-register with Eureka & stop application heartbeats
``` js
global.Eureka.stop();

Get Instances By App ID

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

Readme

Keywords

Package Sidebar

Install

npm i @tuia/eureka-js-client

Weekly Downloads

1

Version

0.1.0

License

ISC

Unpacked Size

7.71 kB

Total Files

9

Last publish

Collaborators

  • any-u
  • dinglh
  • candy_dd
  • wintersun97
  • tump
  • inuanfeng
  • zhoucheng
  • zhangmin173
  • aiduck
  • chao.zhou
  • babalk
  • leitingting
  • nbseven
  • linhao-vue
  • liusandy