且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

猫鼬连接方法在简单的节点服务器上失败.快递,猫鼬,路径

更新时间: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.