The Node.js child process module helps us to spawn child processes in a similar manner to popen(3).
The following are the three major way to create child process:
- child_process.exec() method: This method runs a command in a shell/console and buffers the output.
- child_process.spawn() method: This method creates a new process with a given command.
- child_process.fork() method: This method is a special case of spawn() method to create node child processes.
If you want to learn Node Js from an online course, then enroll in this Node Js Certification by Intellipaat.
Also, watch this video on Node Js: