Update server.js
Browse files
server.js
CHANGED
@@ -22,17 +22,17 @@ wss.on('connection', (ws) => {
|
|
22 |
exec(command, (error, stdout, stderr) => {
|
23 |
if (error) {
|
24 |
ws.send(`Error: ${error.message}`);
|
25 |
-
console.log(
|
26 |
return;
|
27 |
}
|
28 |
if (stderr) {
|
29 |
ws.send(`stderr: ${stderr}`);
|
30 |
-
console.log(
|
31 |
return;
|
32 |
}
|
33 |
if (stdout) {
|
34 |
ws.send(`stdout: ${stdout}`);
|
35 |
-
console.log(
|
36 |
return;
|
37 |
}
|
38 |
//ws.send(`stdout: ${stdout}`);
|
|
|
22 |
exec(command, (error, stdout, stderr) => {
|
23 |
if (error) {
|
24 |
ws.send(`Error: ${error.message}`);
|
25 |
+
console.log(`LOG: ${stderr}`);
|
26 |
return;
|
27 |
}
|
28 |
if (stderr) {
|
29 |
ws.send(`stderr: ${stderr}`);
|
30 |
+
console.log(`LOG: ${stderr}`);
|
31 |
return;
|
32 |
}
|
33 |
if (stdout) {
|
34 |
ws.send(`stdout: ${stdout}`);
|
35 |
+
console.log(`LOG: ${stdout}`);
|
36 |
return;
|
37 |
}
|
38 |
//ws.send(`stdout: ${stdout}`);
|