I'm getting a bit lost in child_process
docs. What is the recommended way to run a server.js
in a child_process
?
Should I run this below? Also, if I kill the main file, will it kill the child process too?
const { exec } = require('child_process')
exec('node server.js')
Backstory: I'm trying to run webpack, but spin up the proxy api server from the webpack JS file.