I have a standalone Node script called compile.js. It is sitting inside the main folder of a small Express app.
compile.js
Sometimes I will run the compile.j
compile.j
Put this line in anywhere of the Node application.
require('child_process').fork('some_code.js'); //change the path depending on where the file is.
In some_code.js file
console.log('calling form parent process');