npm

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

resilient-eureka

1.0.2 • Public • Published

resilient-eureka

resilient.js middleware for Netflix Eureka discovery service

Installation

npm install resilient-eureka --save

Usage

const Resilient = require('resilient')
const eurekaMiddleware = require('resilient-eureka')
 
const client = Resilient()
 
//eureka urls
const servers = [
  'http://demo.eureka.com'
]
 
client.use(eurekaMiddleware({
  serviceName: 'service'
}))
 
client.discoveryServers(servers)
 
// Test request
client.get('/', function (err, res) {
  if (res.status === 200) {
    console.log('Response:', res)
  }
})

Params

  • serviceName/serviceVipAddress string - name/vipAddress of service registered in Eureka (one of these is required)
  • path string - path to query for all Eureka's services instances (default: /eureka/apps)
  • protocol string - transport protocol (default: http)

install

npm i resilient-eureka

Downloadsweekly downloads

13

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability