Permalink
Browse files

curl after server is listening

  • Loading branch information...
1 parent 76d525b commit 11f673e819d79f07dbb42b75a5b070af66fcb4a5 @ry ry committed Apr 22, 2010
Showing with 9 additions and 5 deletions.
  1. +9 −5 test/simple/test-http-304.js
View
14 test/simple/test-http-304.js
@@ -9,11 +9,15 @@ s = http.createServer(function (request, response) {
response.end();
})
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) {
+ if (err) throw err;
+ s.close();
+ sys.puts('curled response correctly');
+ });
-childProcess.exec('curl http://127.0.0.1:8000/', function (err, stdout, stderr) {
- if (err) throw err;
- s.close();
- sys.puts('curled response correctly');
});
-sys.puts('Server running at http://127.0.0.1:8000/')

0 comments on commit 11f673e

Please sign in to comment.