Node.js Piping the same readable stream into multiple (writable) targets
You have to create duplicate of the stream by piping it to two streams. You can create a simple stream with a PassThrough stream, it simply passes the input to the output. const spawn = require(‘child_process’).spawn; const PassThrough = require(‘stream’).PassThrough; const a = spawn(‘echo’, [‘hi user’]); const b = new PassThrough(); const c = new … Read more