Skip to content

Commit

Permalink
Add random sub-100ms delay to response.
Browse files Browse the repository at this point in the history
  • Loading branch information
ammmir committed Aug 28, 2011
1 parent 942b2a3 commit 4724ea4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/hello.js
Expand Up @@ -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/');

0 comments on commit 4724ea4

Please sign in to comment.