simple.js 335 B

1234567891011
  1. var spawnCommand = require('../'),
  2. command = (process.platform === 'win32') ? 'echo "Hello spawn"' : 'echo "Hello spawn" | base64',
  3. child = spawnCommand(command);
  4. child.stdout.on('data', function (data) {
  5. console.log('data', data.toString());
  6. });
  7. child.on('exit', function (exitCode) {
  8. console.log('exit', exitCode);
  9. });