Skip to content

Commit

Permalink
Merge pull request #44 from ph0bos/advertised-port
Browse files Browse the repository at this point in the history
production:release - 0.7.1
  • Loading branch information
ph0bos authored Jul 6, 2018
2 parents c9c28b7 + 51c6a1c commit 20f76e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ In the above example the application would be accessible at the following addres

Note: the `registrationNetworkInterfacePriority` property allows the selection of the network interface when dynamically registering a service with ZooKeeper.

Note: if `registrationNetworkInterfacePriority` dont works for you you can set `ADVERTISED_HOST` enviroment variable.
Note: if `registrationNetworkInterfacePriority` doesn't work for you, you can set `ADVERTISED_HOST` and `ADVERTISED_PORT` environment variable.

If you would like to override the version which is exposed in the /info endpoint, just set the VERSION node env variable.

Expand Down
4 changes: 2 additions & 2 deletions lib/zoologist.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ ZoologistConfig.prototype.initialise = function(options) {
self.serviceInstance =
ServiceInstanceBuilder
.builder()
.address(process.env.ADVERTISED_HOST ||self.getIpAddress())
.port(process.env.PORT || options.server.port)
.address(process.env.ADVERTISED_HOST || self.getIpAddress())
.port(process.env.ADVERTISED_PORT || process.env.PORT || options.server.port)
.name(options.serviceName)
.build();

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "express-microservice-starter",
"version": "0.7.0",
"version": "0.7.1",
"description": "An express-based Node.js API bootstrapping module for microservices.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 20f76e2

Please sign in to comment.