aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/spawn-command/examples/simple.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/spawn-command/examples/simple.js')
-rw-r--r--node_modules/spawn-command/examples/simple.js11
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);
+});
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage