Commits

Sean Wilkinson  committed 73eed3f

Improved environment detection in web-service demo

  • Participants
  • Parent commits 6a70243

Comments (0)

Files changed (1)

File src/web-service/server.js

 
 //- server.js ~~
 //                                                      ~~ (c) SRW, 06 Oct 2012
-//                                                  ~~ last updated 09 Dec 2013
+//                                                  ~~ last updated 15 Dec 2013
 
 (function () {
     'use strict';
         options.static_content = parse(process.env.QM_WWW_STRING);
     }
 
+    if (process.env.VCAP_APP_PORT !== undefined) {
+     // This is for use with AppFog.
+        options.port = process.env.VCAP_APP_PORT;
+    }
+
     if (process.env.VMC_APP_PORT !== undefined) {
      // This is for use with Cloud Foundry platforms.
         options.hostname = null;