Created
November 10, 2016 17:12
-
-
Save avarabyeu/29decd46b990e5d60ea0f5916468bb09 to your computer and use it in GitHub Desktop.
rp-eureka-js.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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