Skip to content

Commit

Permalink
logging stdout and stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
opheliagame committed May 15, 2024
1 parent ff9c2b1 commit 774f0e9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ app.post('/supercut', (req, res) => {

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

child.stdout.on('data', function (data) {
console.log('stdout: ' + data);
});

child.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});

child.on('close', (code, signal) => {
console.log(`Process exited with code: ${code} ${signal}`);
if (code === 0) {
Expand Down

0 comments on commit 774f0e9

Please sign in to comment.