Skip to content

Resilient HTTP middleware for Netflix Eureka discovery service

License

Notifications You must be signed in to change notification settings

zrwsk/resilient-eureka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Resilient HTTP middleware for Netflix Eureka discovery service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published