replServer.setupHistory(historyPath, callback)
- historyPath<string> 历史文件的路径
- callback<Function> 当历史写入准备好或出错时调用- err<Error>
- repl<repl.REPLServer>
 
初始化 REPL 实例的历史日志文件。
但是,以编程方式创建 REPL 时并非如此。 在以编程方式使用 REPL 实例时,使用此方法初始化历史日志文件。
- historyPath<string> the path to the history file
- callback<Function> called when history writes are ready or upon error- err<Error>
- repl<repl.REPLServer>
 
Initializes a history log file for the REPL instance. When executing the Node.js binary and using the command line REPL, a history file is initialized by default. However, this is not the case when creating a REPL programmatically. Use this method to initialize a history log file when working with REPL instances programmatically.
