Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add random sub-100ms delay to response.

  • Loading branch information...
commit 4724ea40e8c81eca1953ef3048e6e66adb441664 1 parent 942b2a3
@ammmir authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 examples/hello.js
View
4 examples/hello.js
@@ -9,7 +9,9 @@ http.createServer(function (req, res) {
links += '<li><a href="/' + s + '">' + s + '</a></li>';
});
- res.end('<h1>' + req.url + '</h1>Click any link and watch your RESTalytics dashboard:<ul>' + links + '</ul>');
+ setTimeout(function() {
+ res.end('<h1>' + req.url + '</h1>Click any link and watch your RESTalytics dashboard:<ul>' + links + '</ul>');
+ }, Math.floor(Math.random() * 100));
}).listen(1337);
console.log('Server running at http://127.0.0.1:1337/');
Please sign in to comment.
Something went wrong with that request. Please try again.