Skip to content

Instantly share code, notes, and snippets.

@rafaelmaeuer
Last active October 9, 2017 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelmaeuer/12ef19c12c85c40a23720201ab8560d6 to your computer and use it in GitHub Desktop.
Save rafaelmaeuer/12ef19c12c85c40a23720201ab8560d6 to your computer and use it in GitHub Desktop.
var util = require('util');
var exec = require('child_process').exec;
var command = 'curl -sL -w "%{http_code} %{time_total}\\n" "http://query7.com" -o /dev/null'
child = exec(command, function(error, stdout, stderr){
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if(error !== null)
{
console.log('exec error: ' + error);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment