diff options
Diffstat (limited to 'node_modules/spawn-command/examples/simple.js')
| -rw-r--r-- | node_modules/spawn-command/examples/simple.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/node_modules/spawn-command/examples/simple.js b/node_modules/spawn-command/examples/simple.js new file mode 100644 index 0000000..96fab54 --- /dev/null +++ b/node_modules/spawn-command/examples/simple.js @@ -0,0 +1,11 @@ +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); +}); |
