projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5457eae
)
Allow different ports for http_simple.js
author
Ryan Dahl
<ry@tinyclouds.org>
Mon, 3 May 2010 00:26:18 +0000
(17:26 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Mon, 3 May 2010 00:26:18 +0000
(17:26 -0700)
benchmark/http_simple.js
patch
|
blob
|
history
diff --git
a/benchmark/http_simple.js
b/benchmark/http_simple.js
index e709f2d72428dc0bbb5f77199944c1e1060cdf33..54958d169b6abe9e6ad29d62939353d59e4ae0e7 100644
(file)
--- 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+'/');