MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017

When i run the project on vscode its working fine but when i deploy the nodejs code,the mongoose shows error.what to do?

Hi,

127.0.0.1:27017 is showing that your code is trying to connect to a MongoDB instance on your Web Service. This is almost certainly not the correct host.

You’ll need to update your Mongoose credentials to point to your MongoDB server, whether that’s set up and managed yourself as a Private Service on Render, or with an external provider.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.