Node.js spawn child process and get terminal output live

It’s much easier now (6 years later)! Spawn returns a childObject, which you can then listen for events with. The events are: Class: ChildProcess Event: ‘error’ Event: ‘exit’ Event: ‘close’ Event: ‘disconnect’ Event: ‘message’ There are also a bunch of objects from childObject, they are: Class: ChildProcess child.stdin child.stdout child.stderr child.stdio child.pid child.connected child.kill([signal]) child.send(message[, … Read more