Skip to content

Commit aa98d91

Browse files
author
Matthew Dobson
authored
Merge pull request #92 from apigee-internal/pcf-port-fix
Updating reload of config to use port env variable.
2 parents a88ed6b + 1d34ddd commit aa98d91

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/server.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ Agent.prototype.start = function start(token,pluginDir, config, cb) {
5252
if (_isLoopback(config)) {
5353
return cb && cb(new Error("Error - loopback scenario identified, halting start-up"));
5454
}
55+
56+
57+
if(process.env.PORT) {
58+
config.edgemicro.port = process.env.PORT;
59+
}
60+
5561
this.gatewayServer = gateway(pluginDir,config);
5662
this.gatewayServer.start((err) => {
5763
err && console.error(err);

0 commit comments

Comments
 (0)