Created
September 20, 2016 16:03
-
-
Save albacoretuna/64a3b674a7746759e32135944f2b255b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// require an internal utility in node for running commands in command line | |
var exec = require('child_process').exec; | |
var child; | |
// get exec from that utily, give the command you want to run as it's first argument | |
child = exec('npm install ffi', | |
function (error, stdout, stderr) { | |
// these are the result, somehow, it's devided to when there's error, or output etc. | |
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