diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-05-03 04:26:18 +0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-05-03 04:26:18 +0400 |
commit | 99984772df1cb63fd2a56f2eca62b012653e974e (patch) | |
tree | c451dfc335154b25032d79747b4222131004dc73 /benchmark | |
parent | 5457eae28c24739d2d0d779ab0f7deb4999a3636 (diff) |
Allow different ports for http_simple.js
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/http_simple.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/benchmark/http_simple.js b/benchmark/http_simple.js index e709f2d7242..54958d169b6 100644 --- a/benchmark/http_simple.js +++ b/benchmark/http_simple.js @@ -1,5 +1,7 @@ path = require("path"); +port = parseInt(process.env.PORT || 8000); + var puts = require("sys").puts; var old = (process.argv[2] == 'old'); @@ -61,4 +63,6 @@ http.createServer(function (req, res) { } else { res.end(body, 'ascii'); } -}).listen(8000); +}).listen(port); + +puts('Listening at http://127.0.0.1:'+port+'/'); |