Here is my code:
var concat = require('concat-stream');
process.stdin.pipe(concat(function(){console.log("output")}));
What I expect from this is to output "output" every time I enter console input, but this does not work. Does anyone have an idea why this is not working? If I create an fs.createReadStream () buffer, it works fine, just not with process.stdin.pipe (). However, I used process.stdin.pipe () for other things, and they worked just fine.
Thanks in advance!
source
share