Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including resilient-eureka-middleware with all npm packages installed. Try it out:

var resilientEurekaMiddleware = require("resilient-eureka-middleware")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

resilient-eureka-middleware v0.0.2

Resilient HTTP middleware for Eureka service discovery and balancing

resilient-eureka

resilient.js HTTP client middleware for Eureka.

Via this middleware you can use Eureka as compatible discovery server in Resilient HTTP clients. Greatly inspired by resilient-consul.

Installation

Node.js

Requires Node.js 8+.

npm install resilient-eureka-middleware --save

Usage

// ES2016 modules with babel
import Resilient from 'resilient';
import eureka from 'resilient-eureka-middleware';

const client = Resilient({
  discovery: {
    servers: ['http://localhost:8761'],
    headers: {
      Accept: 'application/json'
    }
  }
});
client.use(eureka());
return client;

License

MIT

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free