Permalink
Browse files

Test app with links [one reaches outside / one is internal to app].

Change-Id: I714d3498f9c6889e4138214f510515631fb11128
  • Loading branch information...
1 parent ef84d25 commit b5df09722c2474f73ffa22475c06b56ec9624b15 AB Srinivasan committed Oct 24, 2011
@@ -0,0 +1,16 @@
+var http = require('http');
+var url = require('url');
+
+HOST = null;
+
+var host = process.env.VCAP_APP_HOST || 'localhost';
+var port = process.env.VCAP_APP_PORT || 3000
+
+http.createServer(function (req, res) {
+ res.writeHead(200, {'Content-Type': 'text/html'});
+ res.write('<h1>Hello from the Cloud! ');
+ res.write('via: ' + host + ':' + port);
+ res.end('</h1>');
+}).listen(port, null);
+
+console.log('Server running at http://' + host + ':' + port + '/');
No changes.

0 comments on commit b5df097

Please sign in to comment.