在 myFile.js 文件末尾添加以下内容,即可使用 EasyREPL: if (require.main === module) {eval(require('easy-repl'));} 随后从命令行输入 node myfile.js,它将执行 myfile.js 的所有功能,
Nodejs 17 次浏览