Skip to content

Instantly share code, notes, and snippets.

@indutny indutny/server.js Secret
Created Nov 20, 2012

Embed
What would you like to do?
var http = require('http'),
request = require('request');
http.Agent.maxSockets = 1000;
var max = 0;
http.createServer(function(req, res) {
var start = +new Date;
request({
method: 'GET',
url: 'http://127.0.0.1:5984/',
}, function(err, response, body) {
var time = +new Date - start;
if (time > max) {
max = time;
console.log(max);
}
res.end('none');
});
}).listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.