Last active
August 29, 2015 14:00
-
-
Save lxe/11383597 to your computer and use it in GitHub Desktop.
spawn test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.log('test test') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var spawn = require('child_process').spawn, | |
| ls = spawn('node', ['runme.js']); | |
| ls.stdout.on('data', function (data) { | |
| console.log('stdout: ' + data); | |
| }); | |
| ls.stderr.on('data', function (data) { | |
| console.log('stderr: ' + data); | |
| }); | |
| ls.on('close', function (code) { | |
| console.log('child process exited with code ' + code); | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
node spawn.js