:%s/8000/PORT/g for a few tests

This commit is contained in:
Ryan Dahl 2010-05-27 16:49:21 -07:00
parent 72262060db
commit 0e713e7482
2 changed files with 5 additions and 4 deletions

View File

@ -11,17 +11,17 @@ server = http.createServer(function (req, res) {
server.close();
});
});
server.listen(8000);
server.listen(PORT);
server.addListener('listening', function () {
sys.puts('Server running at http://127.0.0.1:8000/');
sys.puts('Server running at http://127.0.0.1:'+PORT+'/');
errorTimer =setTimeout(function () {
throw new Error('Timeout was not sucessful');
}, 2000);
http.cat('http://localhost:8000/', 'utf8', function (err, content) {
http.cat('http://localhost:'+PORT+'/', 'utf8', function (err, content) {
clearTimeout(errorTimer);
sys.puts('HTTP REQUEST COMPLETE (this is good)');
});

View File

@ -1,4 +1,5 @@
PORT = 8000;
require('../common');
sys = require('sys');
http = require('http');
assert = require('assert');