Node.js - Child Processes
What will the following code output?
const { fork } = require('child_process');
const child = fork('child.js');
child.on('message', msg => console.log('Parent got:', msg));
child.send('Hello');
// child.js content:
process.on('message', msg => {
process.send(msg + ' World');
});