Node.js - Child Processes
Examine this Node.js code snippet:
What is the issue with this code?
const { fork } = require('child_process');
const child = fork('worker.js');
child.send('start');
child.on('message', msg => console.log(msg));
child.on('error', err => console.log('Error:', err));
child.on('exit', code => console.log('Exited with', code));What is the issue with this code?
