exec-to-html
Execute command sending output through stream to client
Main goal
- To call process in the back-end sending the output to de front-end
Install
$ npm install exec-to-html
Ejemplo de uso
Use example
var execToHtml = require('exec-to-html');
execToHtml.run('npm-check-updates',{echo:true}).onLine(function(lineInfo){
if(lineInfo.origin === 'stderr'){
console.error(lineInfo.text);
}else{
console.log(lineInfo.text);
}
}).then(function(exitCode){
if(exitCode){
console.log('exit code =',exitCode);
}
});