Skip to content

Commit 774f0e9

Browse files
committed
logging stdout and stderr
1 parent ff9c2b1 commit 774f0e9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

server.js

+8
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ app.post('/supercut', (req, res) => {
8383

8484
const child = childProcess.spawn('ffmpeg', inputs)
8585

86+
child.stdout.on('data', function (data) {
87+
console.log('stdout: ' + data);
88+
});
89+
90+
child.stderr.on('data', function (data) {
91+
console.log('stderr: ' + data);
92+
});
93+
8694
child.on('close', (code, signal) => {
8795
console.log(`Process exited with code: ${code} ${signal}`);
8896
if (code === 0) {

0 commit comments

Comments
 (0)