:%s/8000/PORT/g for a few tests
This commit is contained in:
parent
72262060db
commit
0e713e7482
@ -11,17 +11,17 @@ server = http.createServer(function (req, res) {
|
|||||||
server.close();
|
server.close();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
server.listen(8000);
|
server.listen(PORT);
|
||||||
|
|
||||||
|
|
||||||
server.addListener('listening', function () {
|
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 () {
|
errorTimer =setTimeout(function () {
|
||||||
throw new Error('Timeout was not sucessful');
|
throw new Error('Timeout was not sucessful');
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
http.cat('http://localhost:8000/', 'utf8', function (err, content) {
|
http.cat('http://localhost:'+PORT+'/', 'utf8', function (err, content) {
|
||||||
clearTimeout(errorTimer);
|
clearTimeout(errorTimer);
|
||||||
sys.puts('HTTP REQUEST COMPLETE (this is good)');
|
sys.puts('HTTP REQUEST COMPLETE (this is good)');
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
PORT = 8000;
|
require('../common');
|
||||||
|
|
||||||
sys = require('sys');
|
sys = require('sys');
|
||||||
http = require('http');
|
http = require('http');
|
||||||
assert = require('assert');
|
assert = require('assert');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user