As the title already says I want to make a Nodejs script which starts a website with the live console output of a subprocess.
This is my subprocess:
const { spawn } = require('child_process');
const subprocess = spawn(process.argv[0], ['bot_index.js'], {
detached: false,
stdio: ['ignore', process.stdout, process.stderror]
});
To make it more clearly: I want to create a webpage (with express perhaps?) which then provides the live console output of this subprocess (process.stdout)
I would be very happy if someone could help me.
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire