Mongoose Can't Connect Without Internet

前端 未结 2 633
遇见更好的自我
遇见更好的自我 2020-12-11 01:28

I have my MongoDB server running on localhost:27017, and while I can usually run my Node.js app fine, when I disconnect from the internet Mongoose throws the er

2条回答
  •  悲&欢浪女
    2020-12-11 01:52

    Use 127.0.0.1 instead of localhost. By turning off your wifi interface the OS is no longer able to resolve localhost.

提交回复
热议问题