Saturday, September 5, 2020

Launch an os command

 execute.js

-----

const execute = require('child_process').exec;

execute("dir",(err,stdout)=>{

 if(err){

 return err;

}

console.log(stdout);

});

No comments:

Post a Comment