Skip to content

Commit

Permalink
support VCAP_APP_PORT and GITHUB_ENDPOINT
Browse files Browse the repository at this point in the history
  • Loading branch information
ssq@adf authored and ssq@adf committed Jun 16, 2016
1 parent 261b736 commit 8196db4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if (process.env.ANALYTICS_TOKEN) {
var myNuts = nuts.Nuts({
repository: process.env.GITHUB_REPO,
token: process.env.GITHUB_TOKEN,
endpoint: process.env.GITHUB_ENDPOINT,
username: process.env.GITHUB_USERNAME,
password: process.env.GITHUB_PASSWORD,
timeout: process.env.VERSIONS_TIMEOUT,
Expand Down Expand Up @@ -120,7 +121,7 @@ myNuts.init()

// Start the HTTP server
.then(function() {
var server = app.listen(process.env.PORT || 5000, function () {
var server = app.listen(process.env.VCAP_APP_PORT || process.env.PORT || 5000, function () {
var host = server.address().address;
var port = server.address().port;

Expand Down
1 change: 1 addition & 0 deletions lib/backends/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function GitHubBackend() {

this.client = new GitHub({
token: this.opts.token,
endpoint: this.opts.endpoint,
username: this.opts.username,
password: this.opts.password
});
Expand Down

0 comments on commit 8196db4

Please sign in to comment.