Browse Source

curl after server is listening

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
11f673e819
  1. 6
      test/simple/test-http-304.js

6
test/simple/test-http-304.js

@ -9,6 +9,9 @@ s = http.createServer(function (request, response) {
response.end(); response.end();
}) })
s.listen(8000); s.listen(8000);
sys.puts('Server running at http://127.0.0.1:8000/')
s.addListener('listening', function () {
childProcess.exec('curl http://127.0.0.1:8000/', function (err, stdout, stderr) { childProcess.exec('curl http://127.0.0.1:8000/', function (err, stdout, stderr) {
if (err) throw err; if (err) throw err;
@ -16,4 +19,5 @@ childProcess.exec('curl http://127.0.0.1:8000/', function (err, stdout, stderr)
sys.puts('curled response correctly'); sys.puts('curled response correctly');
}); });
sys.puts('Server running at http://127.0.0.1:8000/') });

Loading…
Cancel
Save