diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/node_modules diff --git a/README.md b/README.md index 0820445..cad8195 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,6 @@ This is a work-in-progress test harness for the Activity Streams 2.0 specification. -Additional detail to be added. \ No newline at end of file +You can try it out the WIP at [https://activitystreams-testing.herokuapp.com/](https://activitystreams-testing.herokuapp.com/). + +Additional detail to be added. diff --git a/README.txt b/README.txt index 0820445..cad8195 100644 --- a/README.txt +++ b/README.txt @@ -3,4 +3,6 @@ This is a work-in-progress test harness for the Activity Streams 2.0 specification. -Additional detail to be added. \ No newline at end of file +You can try it out the WIP at [https://activitystreams-testing.herokuapp.com/](https://activitystreams-testing.herokuapp.com/). + +Additional detail to be added. diff --git a/server.js b/server.js index b3b1b2f..b32d935 100644 --- a/server.js +++ b/server.js @@ -20,8 +20,13 @@ app.use(methodOverride()); // simulate DELETE and PUT app.engine('html', require('ejs').renderFile); app.set('views', __dirname + '/views'); -app.set('host', process.env.VCAP_APP_HOST || 'localhost'); // The IP address of the Cloud Foundry DEA (Droplet Execution Agent) that hosts this application -app.set('port', process.env.VCAP_APP_PORT || '3000'); // The port on the DEA for communication with the application + +if (process.env.VCAP_APP_HOST) { + // The IP address of the Cloud Foundry DEA (Droplet Execution Agent) that hosts + // this application + app.set('host', process.env.VCAP_APP_HOST); +} +app.set('port', process.env.VCAP_APP_PORT || process.env.PORT || '3000'); // The port on the DEA for communication with the application var appInfo = JSON.parse(process.env.VCAP_APPLICATION || "{}"); // VCAP_APPLICATION contains useful information about a deployed application. // TODO: Get application information and use it in your app. @@ -48,4 +53,4 @@ console.log('App started on ' + app.get('host') + ':' + app.get('port')); process.on( 'SIGINT', function() { console.log( "\nGracefully shutting down from SIGINT (Ctrl-C)" ); process.exit( ); -}) \ No newline at end of file +})