Skip to content

Instantly share code, notes, and snippets.

@cbrammer
Created April 6, 2012 16:05
Show Gist options
  • Save cbrammer/2321021 to your computer and use it in GitHub Desktop.
Save cbrammer/2321021 to your computer and use it in GitHub Desktop.
Bees
var http = require('http');
function hitServer(url, port) {
var options = {
host: url,
port: port,
path: '/'
};
http.get(options, function(res) {
console.log("Got response: " + res.statusCode);
}).on('error', function(e) {
console.log("Got error: " + e.message);
});
}
function hitServers() {
// vanila server
hitServer('ec2-107-22-47-71.compute-1.amazonaws.com', 3000);
// just bp
// hitServer('ec2-23-20-209-180.compute-1.amazonaws.com', 3000);
// everything
hitServer('ec2-50-19-144-143.compute-1.amazonaws.com', 3000);
}
setInterval(hitServers, 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment