So I have two schemas user and driver they both have latitude and longitude attributes. At some point I want to query the database for nearby drivers, I will be
I am trying to build a CRUD API that query a mongodb. I want to add another attribute (temperature) to the query result before sending it back to the client. Pa
I'm building a simple MERN blogging app with a local MongoDB. Everything was working fine until yesterday. I literally changed nothing at all and now I can't co
I have an app with MongoDB (Mongoose) in NodeJs. In a collection I have this type of documents, defined by weeks: { "_id": {"$oid":"617f3f51f883fab2de3e7260"},
I'm trying to fetch an array from my user database from my react app. The response I'm getting is an HTML file, but I'm not sure why it's not working as I have
I've been trying for over 2 hours now trying to figure out what's wrong with this database. I've tried everything. From reinstalling the server, restarting the
I am trying to add a number indicator to my cart icon that will display the number of items added after the product has been saved to my database. <div class
I have working on my final year college project On MERN stack. my problem is mentioned bellow please help me. const Organization = mongoose.Schema({ name: {
I'm trying to seed my entire database for all the necessary resources that need to be present to test my API successfully. My tests are in several files. How ca
As part of my course I'm learning mongodb and now Mongoose. I've written the code exactly as done in the lesson but when trying to start it with node app.js I g
FULL DISCLOSURE: I'm a MongoDB noob I'm dealing with a legacy DB structure. A part of my MongoDB looks like this currently: Events (_id, name (string), ...) Ord
using nestjs framework and with a repository class that uses mongoose to do the CRUD operations we have a simple users.repository.ts file like this: @Injectable
So I'm using MongoDB Atlas, Mongoose, Multer and GridFsStorage to upload files to a single database on the cloud which works fine, but I want to be able to uplo
I basically defined this Model, much like another which doesn't error out; So I am stumped as to why it's not working... Here is a Minimal, Reproducible Example
Data.findOne({}).then((respp)=>console.log(respp, "find one")) Like I have this method this is returning First object and if I apply a condition then i can
How to sort data based on entry of parent collection in mongodb using mongoose package. My schema is organised as given below Profile Schema const mongoose
I'm currently working on a movie database with graphql and mongodb. When a new review is added I want to push the review id immediately to the reviews array of
My nodejs app was working fine with mongodb connection and suddenly this error got appeared. Then I tried to connect to mongodb with mongo compass and same erro
I'm storing some data I'm getting from API calls in a collection ('Asin'). - work just fine. I build two pages -register & log in, installed all relevant bc
For some odd reason (i have been deployed on Heroku for around 1.5 years) my instance decided to throw a weird error regarding not finding 'mongoose' after atte