Created
June 14, 2012 10:08
-
-
Save aben/2929418 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//e.g. http://domain:8888/?sleep=5000 | |
var http = require("http"); | |
var url = require("url"); | |
var query = require("querystring"); | |
http.createServer(function(request, response) { | |
var str = url.parse(request.url).query; | |
var obj = query.parse(str); | |
setTimeout(function(){ | |
response.end(); | |
}, obj.sleep); | |
}).listen(8888); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment