Server has no output when executed by node exec()
brachkow opened this issue · 3 comments
brachkow commented
When I run server from cli everything works as expected, but if I run it from node.js it doesn't output anything.
const { exec } = require('child_process');
exec(
`ws --directory ./dist/ --spa index.html --port 1111`,
(error, stdout, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
return;
}
if (stderr) {
console.log(`stderr: ${stderr}`);
return;
}
console.log(`stdout: ${stdout}`);
},
);
75lb commented