xxxxxxxxxx
const { exec } = require('child_process');
// Execute the command to kill all Node.js processes
exec('killall node', (error, stdout, stderr) => {
if (error) {
console.error(`Error executing command: ${error}`);
return;
}
console.log(`STDOUT: ${stdout}`);
console.error(`STDERR: ${stderr}`);
});