0

i tried to connect my vscode node.js to mongodb compass, the installation is running fine on system but i can't connect to mongodb://localhost:27017, error: MongoNetworkError: connect ECONNREFUSED ::1:27017 keeps popping in my terminal

i changed the ::1 to 127.0.0.1 and the connection was successfully but after i tried to use postman to test my mongodb compass connection it seems it's necessary to run the connection on mongodb://localhost:27017 and not mongodb://127.0.0.1:27017
how can i really maintain the connection on mongodb://localhost:27017 ?

uninoved
  • 1
  • 1
  • Does this help? https://stackoverflow.com/questions/74826965/mongoserverselectionerror-connect-econnrefused-127017/74828293#74828293 – Joe Jan 29 '23 at 04:06
  • 1
    or https://stackoverflow.com/questions/74609210/cant-connect-to-mongodb-6-0-server-locally-using-nodejs-driver/74610881#74610881 – Joe Jan 29 '23 at 04:29
  • Does this answer your question? [Can't connect to MongoDB 6.0 Server locally using Nodejs driver](https://stackoverflow.com/questions/74609210/cant-connect-to-mongodb-6-0-server-locally-using-nodejs-driver) – Wernfried Domscheit Jan 30 '23 at 07:10

0 Answers0