Heroku and MongoDB Atlas connection failing

  1. go to mongodb atlas
  2. click security → Network Access → ADD IP ADDRESS → Choose allow access from anywhere and save
  3. click connect and get your application to your code and paste to your application.
4 Likes