hugoWebsite/node_modules/spawn-command/examples/simple.js
Jeremy Nusser 0ab675d92b Initial commit... 🎉🎉🎉
2022-10-28 17:20:35 -05:00

11 lines
335 B
JavaScript

var spawnCommand = require('../'),
command = (process.platform === 'win32') ? 'echo "Hello spawn"' : 'echo "Hello spawn" | base64',
child = spawnCommand(command);
child.stdout.on('data', function (data) {
console.log('data', data.toString());
});
child.on('exit', function (exitCode) {
console.log('exit', exitCode);
});