Skip to content

Instantly share code, notes, and snippets.

@avarabyeu
Created November 10, 2016 17:12
Show Gist options
  • Save avarabyeu/29decd46b990e5d60ea0f5916468bb09 to your computer and use it in GitHub Desktop.
Save avarabyeu/29decd46b990e5d60ea0f5916468bb09 to your computer and use it in GitHub Desktop.
rp-eureka-js.js
const Eureka = require('eureka-js-client').Eureka;
const client = new Eureka({
// application instance information
instance: {
app: 'ui',
hostName: 'localhost',
port: {
"$": 8080,
"@enabled": "true"
},
vipAddress: 'localhost',
dataCenterInfo: {
name: 'MyOwn',
"@class":"com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo"
},
},
eureka: {
// eureka server host / port
host: 'localhost',
port: 8761,
servicePath: '/eureka/apps/'
},
});
client.logger.level('debug');
client.start(function(error){
console.log(error || 'complete');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment