Browse Source

Allow different ports for http_simple.js

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
99984772df
  1. 6
      benchmark/http_simple.js

6
benchmark/http_simple.js

@ -1,5 +1,7 @@
path = require("path"); path = require("path");
port = parseInt(process.env.PORT || 8000);
var puts = require("sys").puts; var puts = require("sys").puts;
var old = (process.argv[2] == 'old'); var old = (process.argv[2] == 'old');
@ -61,4 +63,6 @@ http.createServer(function (req, res) {
} else { } else {
res.end(body, 'ascii'); res.end(body, 'ascii');
} }
}).listen(8000); }).listen(port);
puts('Listening at http://127.0.0.1:'+port+'/');

Loading…
Cancel
Save