4
我遇到了node.js的readline问题。下面显示的是控制台输出:粗体的内容是我输入的内容,剩下的就是服务器正在记录的内容。readline with console.log in the background
>Teslog message >Testinlog message > log message log message Tlog message estinglog message >123
简单地说,我的代码看起来像这样
setInterval(function() { console.log("log message") }, 1000);
var cli = require('readline').createInterface(process.stdin, process.stdout);
cli.setPrompt("> ", 2);
cli.on('line', function(line) {
cli.prompt();
});
cli.prompt();
我怎样才能得到及时转移后得到新的输出室,而没有完全捣毁无论我打字?
你有没有显示那些“更多黑客”?你应该显示什么做了,没有像你想要的那样工作。 – jcolebrand
是的,第4行被说成是黑客 – Eric
但是请让人们明白什么没有工作和做什么,这就是我所要求的。 – jcolebrand