MongoError: Topology is closed, please connect

前端 未结 2 1590
小蘑菇
小蘑菇 2021-01-18 16:07

I\'m a front-end dev trying to expand my horizons on a new Next project, learning Node, Mongo, and the server side of GraphQL for the first time. Apollo strikes me as the ea

2条回答
  •  无人及你
    2021-01-18 16:48

    Actually there is one more thing that may be causing this as I also had the same exact error "Topology Closed, please connect".

    The thing is if you have a dynamic IP address then in MongoDB atlas you should try allowing all IP addresses.

    Add the IP address: 0.0.0.0/0 All my problems were solved after whitelisting this IP address which allows all.

    Image of dynamic IP 0.0.0.0/0:

提交回复
热议问题