skip to Main Content

ERRCONNREFUSED when connecting Mongodb in node.js

I am trying to set up MongoDB with Node.js and I keep getting the following error: Uncaught MongooseServerSelectionError MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 at MongooseError (c:Userslilpimongonode_modulesmongooseliberrormongooseError.js:7:1) at MongooseServerSelectionError (c:Userslilpimongonode_modulesmongooseliberrorserverSelection.js:26:1) at Connection.openUri (c:Userslilpimongonode_modulesmongooselibconnection.js:824:32) at <anonymous> (c:Userslilpimongonode_modulesmongooselibindex.js:381:10) at <anonymous> (c:Userslilpimongonode_modulesmongooselibhelperspromiseOrCallback.js:41:5) at promiseOrCallback (c:Userslilpimongonode_modulesmongooselibhelperspromiseOrCallback.js:40:10)…

VIEW QUESTION

How to use find method with nested documents in mongodb with nextjs?

I have my data structured like this that I get from localhost:3000/api/notes/[noteTitle]/note2 { "data": [ { "_id": "62ff418fa4adfb3a957a2847", "title": "first-note2", "note": { "_id": "62ff399da4adfb3a957a2808", "title": "first" }, }, { "_id": "631af43b054a6aef1a7c4f08", "title": "first-note22", "note": { "_id": "62ff399da4adfb3a957a2808", "title": "first" },…

VIEW QUESTION
Back To Top
Search