Connecting nodejs to mongodb server

I’m encountering difficulties connecting my Node.js application to MongoDB. I’m receiving the following error message: “MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017]”.

Losts of good reads at
https://www.mongodb.com/community/forums/search?q=ECONNREFUSED

1 Like