How can we get values from standard input in Deno?
I don\'t know how to use Deno.stdin
.
An example would be appreciated.
I have a small terminal sample to test with the Deno TCP echo server. It's something like:
private input = new TextProtoReader(new BufReader(Deno.stdin));
while (true) {
const line = await this.input.readLine();
if (line === Deno.EOF) {
console.log(red('Bye!'));
break;
} else {
// display the line
}
}
The full project is on Github.