express-mongodb-crud icon indicating copy to clipboard operation
express-mongodb-crud copied to clipboard

MongooseServerSelectionError: connect ECONNREFUSED ::1:27017

Open m-naeem66622 opened this issue 3 years ago • 1 comments

I had completed all the steps sucessfully and started mongodb on my default port. Then tried to start the server but it gives me this error: MongooseServerSelectionError: connect ECONNREFUSED ::1:27017 at Connection.openUri (E:\Code Playground\ReactJs\express-mongodb-crud\node_modules\mongoose\lib\connection.js:797:32) at E:\Code Playground\ReactJs\express-mongodb-crud\node_modules\mongoose\lib\index.js:341:10 at E:\Code Playground\ReactJs\express-mongodb-crud\node_modules\mongoose\lib\helpers\promiseOrCallback.js:32:5 at new Promise (<anonymous>) at promiseOrCallback (E:\Code Playground\ReactJs\express-mongodb-crud\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:10) at Mongoose._promiseOrCallback (E:\Code Playground\ReactJs\express-mongodb-crud\node_modules\mongoose\lib\index.js:1167:10) at Mongoose.connect (E:\Code Playground\ReactJs\express-mongodb-crud\node_modules\mongoose\lib\index.js:340:20) at _callee$ (E:\Code Playground\ReactJs\express-mongodb-crud\dist\utils\mongoose.js:22:40) at tryCatch (E:\Code Playground\ReactJs\express-mongodb-crud\node_modules\regenerator-runtime\runtime.js:63:40) at Generator.invoke [as _invoke] (E:\Code Playground\ReactJs\express-mongodb-crud\node_modules\regenerator-runtime\runtime.js:294:22) { reason: TopologyDescription { type: 'Unknown', servers: Map(1) { 'localhost:27017' => [ServerDescription] }, stale: false, compatible: true, heartbeatFrequencyMS: 10000, localThresholdMS: 15, logicalSessionTimeoutMinutes: undefined } }

m-naeem66622 avatar Nov 20 '22 19:11 m-naeem66622

From where can i start my nodemon you just added the way to start node... Is by runing npm start runs both api and frontend

m-naeem66622 avatar Nov 20 '22 19:11 m-naeem66622