qhkm / fiverr-clone-v2

47 stars 43 forks source link

facing issue with Mongoose #2

Open sachincrimsoni opened 3 years ago

sachincrimsoni commented 3 years ago

[nodemon] starting node server.js (node:13232) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html Running on port 3000

D:\htdocs\REACT\fiverr-clone\fiverr-clone-v2\node_modules\mongodb\lib\mongo_client.js:421 throw err ^ MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017] at Pool. (D:\htdocs\REACT\fiverr-clone\fiverr-clone-v2\node_modules\mongodb-core\lib\topologies\server.js:336:35) at Pool.emit (events.js:198:13) at Connection. (D:\htdocs\REACT\fiverr-clone\fiverr-clone-v2\node_modules\mongodb-core\lib\connection\pool.js:280:12) at Object.onceWrapper (events.js:286:20) at Connection.emit (events.js:198:13) at Socket. (D:\htdocs\REACT\fiverr-clone\fiverr-clone-v2\node_modules\mongodb-core\lib\connection\connection.js:189:49) at Object.onceWrapper (events.js:286:20) at Socket.emit (events.js:198:13) at emitErrorNT (internal/streams/destroy.js:91:8) at emitErrorAndCloseNT (internal/streams/destroy.js:59:3) at process._tickCallback (internal/process/next_tick.js:63:19) [nodemon] app crashed - waiting for file changes before starting...

ralyodio commented 2 years ago

did you read the doc?

http://mongoosejs.com/docs/promises.html

You can use async/await now anyway, no need for promises anymore.