Created
January 2, 2017 15:01
-
-
Save ndelangen/d416688c60888e948ae47ea1de4756f8 to your computer and use it in GitHub Desktop.
Spawn can be used to create a process from any command.
This file contains 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
const spawn = require('child_process').spawn; | |
const command = 'node'; | |
const parameters = [path.resolve('program.js')]; | |
const child = spawn(command, parameters, { | |
stdio: [ 'pipe', 'pipe', 'pipe', 'ipc' ] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment