@axah/eureka
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -24,3 +24,3 @@ "use strict"; | ||
function createClient(app) { | ||
function createClient(app, port) { | ||
const ifaces = _os.default.networkInterfaces(); | ||
@@ -51,3 +51,3 @@ | ||
instance: { | ||
instanceId: `${ipAddr}:${app}:${_config.default.port}`, | ||
instanceId: `${ipAddr}:${app}:${port}`, | ||
app, | ||
@@ -57,3 +57,3 @@ hostName: ipAddr, | ||
port: { | ||
$: parseInt(_config.default.port, 10), | ||
$: port, | ||
'@enabled': true | ||
@@ -98,5 +98,5 @@ }, | ||
function register(app) { | ||
function register(app, port) { | ||
if (_config.default && _config.default.register === true) { | ||
const client = createClient(app); | ||
const client = createClient(app, port); | ||
client.start((err, ...other) => { | ||
@@ -103,0 +103,0 @@ if (err) { |
{ | ||
"name": "@axah/eureka", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "lib/index.js", | ||
@@ -13,6 +13,8 @@ "license": "UNLICENSED", | ||
"prepublishOnly": "yarn build", | ||
"build": "yarn lint && yarn clean && npm-run-all -p build:*", | ||
"build": "yarn lint && yarn test && yarn clean && npm-run-all -p build:*", | ||
"clean": "rimraf lib", | ||
"build:babel": "babel src/ -d lib/", | ||
"build:flow": "flow-copy-source src/ lib/" | ||
"build:babel": "babel src/ -d lib/ --ignore '**/*.test.js'", | ||
"build:flow": "flow-copy-source -i '**/*.test.js' src lib/", | ||
"test": "jest", | ||
"ci": "yarn build && yarn flow stop" | ||
}, | ||
@@ -32,4 +34,6 @@ "devDependencies": { | ||
"flow-typed": "^2.5.1", | ||
"jest": "^24.0.0", | ||
"nodemon": "^1.18.9", | ||
"npm-run-all": "^4.1.5" | ||
"npm-run-all": "^4.1.5", | ||
"pino-pretty": "^2.5.0" | ||
}, | ||
@@ -36,0 +40,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9210
16