更新时间:2023-12-04 23:21:16
您实际上需要成功使mongod运行并监听连接.只需键入不带任何选项的mongod
,按Enter,然后运行它.然后在单独的终端中启动您的Express应用程序.请注意,mongod
是mongodb服务器守护程序,而mongo
是命令行客户端,您可以在其中运行交互式REPL并发出数据库命令.
You need to actually successfully get mongod running and listening for connections. Just type mongod
with no options, hit ENTER, and let it run. Then in a separate terminal start your express app. Note that mongod
is the mongodb server daemon whereas mongo
is the command line client where you can run an interactive REPL and issue database commands.