mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
Allow different ports for http_simple.js
This commit is contained in:
parent
5457eae28c
commit
99984772df
@ -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+'/');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user