node: background npm start startup error: MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017

Hi everyone, I am 梅巴哥er.

Today early in the morning, ready to open the project to continue to code, the results suddenly being given: MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017.

The error code is roughly like this:
(Explain, the picture is used by this blogger . Thank you for the blogger’s hint, otherwise I don’t know the problem. Because it was handled all at once, I didn’t have time to take a screenshot of my own error report. , The error is the same as his,
Insert picture description here
so I borrowed the picture) This makes me confused. I have been fine all the time. Why did I suddenly report the error? ! !

Then I checked on Baidu and found that it was mongodb服务关闭了.

Find the reason, then it will be easier.

启动任务管理器 → 找到Mongodb → 右击 → 选择“开始”That's it.

As shown in the figure:
Insert picture description here
Then open it again cmdand enter the command to npm startopen the background service.
Insert picture description here

-----------------------end--------------------------

Guess you like

Origin blog.csdn.net/tuzi007a/article/details/109635739