i am a billionaire
i am a billionaire

Reputation: 11

when I try to connect to mongodb I got these error

(node:9804) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (Use node --trace-deprecation ... to show where the warning was created) Connection errorMongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) { name: 'MongoNetworkError' }]

Upvotes: 1

Views: 534

Answers (1)

M Rahaman
M Rahaman

Reputation: 11

keep your mongodb compass open then try running the code from your IDE.

Upvotes: 0

Related Questions