MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]

前端 未结 26 2817
轻奢々
轻奢々 2020-11-30 04:34

I\'m new in nodeJS, started learning by following a trailer on youtube, everything goes well until I added the connect function if mongodb,

mongo.connect(\"m         


        
26条回答
  •  [愿得一人]
    2020-11-30 05:06

    You're IP address probably changed.

    If you've recently restarted your modem, this changes your IP which was probably whitelisted on Atlas.

    Soooo, you'll need to jump back onto Atlas and add your new IP address to the whitelist under Security>Network Access.

提交回复
热议问题