I am new to Node.js.
I was on their website and I had a sample code from a friend containing "stdin". I went looking for what was stdin, and now I know. Although on the website from Node.js they use " stdin.on ".
I canβt find anything. Maybe someone can fill me ?! :)
process.stdin.setEncoding('utf8'); process.stdin.on('readable', () => { var chunk = process.stdin.read(); if (chunk !== null) { process.stdout.write(`data: ${chunk}`); } }); process.stdin.on('end', () => { process.stdout.write('end'); });
I was hoping that someone could explain this to me at a non-expert level. I know that I can buy a book and start reading, but I do it for pleasure in my free time ...
source share