Skip to content

Instantly share code, notes, and snippets.

@mattandrews
Created October 21, 2014 22:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattandrews/ae8ed13562ecd037517c to your computer and use it in GitHub Desktop.
Save mattandrews/ae8ed13562ecd037517c to your computer and use it in GitHub Desktop.
execute arbitrary shell commands in node
var sys = require('sys')
var exec = require('child_process').exec;
function puts(error, stdout, stderr) { sys.puts(stdout) }
// pass in your command line arguments here – this one uses the default local config
exec("converjon --config node_modules/converjon/config/development.yml", puts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment