So, I have an electron app, and I want to execute shell command on button click. I can't really find any helpful tips. Thanks.
@cloudzik try this method:
const { exec } = require("child_process");
exec("ls -la", (error, stdout, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
return;
}
if (stderr) {
console.log(`stderr: ${stderr}`);
return;
}
console.log(`stdout: ${stdout}`);
});