I have a simple nodeJS app that has a function to scrape file metadata. Since scraping metadata can be intensive I made the app run this as a child process using fork.
const metaParser = child.fork( fe.join(__dirname, 'parse-metadata.js'), [jsonLoad]);
Everything worked great until I ported this to electron. When run in main.js the process is successfully created, but immediately exits. I added some logging to parse-metadata.js and found out that parse-metadata.js executed successfully and ran long enough to run the first few lines of code and then exited.
How do I get electron to fork parse-metadata.js and keep it alive until the end?
I'm using electron v1.4.15 and Node v6