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
var spawn = require('child_process').spawn; | |
var child = spawn('/home/john/.config/myapp/bin/server',['-p','4000']); | |
child.stdout.on('data', function(data) { | |
console.log('stdout: ' + data); | |
//Here is where the output goes | |
}); | |
child.stderr.on('data', function(data) { | |
console.log('stderr: ' + data); | |
//Here is where the error output goes | |
}); |