15
Interaktywne odczytywanie wartości z konsoli
Pomyślałem o stworzeniu prostego serwera HTTP z rozszerzeniem konsoli. Znalazłem fragment do odczytania z danych wiersza poleceń. var i = rl.createInterface(process.stdin, process.stdout, null); i.question('Write your name: ', function(answer) { console.log('Nice to meet you> ' + answer); i.close(); process.stdin.destroy(); }); dobrze zadawać pytania wielokrotnie, nie mogę po prostu użyć while(done) { …