I am new to code and I apologize in advance for all my noob mistakes. I'm trying to set a new color to an existing object stored in MongoDB using the PATCH meth
so i want to query my mongo DB without using a model, let me preface this by saying, i am looking for options other than using the mongodb driver. so in one app
I have a collection on MongoDB from which I'm trying to query all the elements using find(): const mongoose = require('mongoose'); const Featured = mongoose.mod
i came across this error today and did not find a fix for it. const mongoose = require('mongoose'); const userSchema = mongoose.Schema({ name: {type:St
I want to unwind some data, but preserve the parent. I am getting the whole flattened objects, but missing the first one. I want to keep that one. How can I do
Noob MERN Stack Dev here, I am building a little food delivery practice web app. I have begun creating a basic RESTful API to serve my food delivery site. I am
How to solve model.find() function produces "buffering timed out after ... ms"? I'm using mongoose v 5.11.0, npm v6.14.8 and mongodb v Here's the code. var expr
Trying to create a server for my application using graphQL server, but keep getting the error below. I have tried debugging with similar issues on this site but
This is the front end. I have made some changes you can check out my repo if anyone has any answer to this it'll be great use i think there is there a way to li
"ProductCategory": [ { "_id": "6246e0d09b16cf549256ed75", "name": "Arduino Boards", "desc": "this is for demo purpose"
I have a schema with a custom validation. const schema = new mongoose.Schema({ username: { type: String, required: true, validate: {
var mongoose = require("mongoose"); const Schema = mongoose.Schema; let CryptoJS = require("crypto-js"); function encrypt(text) { try { let ciphertext =
So I have a list of posts data that looks like this: [ {user: 'Bob', country: 'USA'} {user: 'Kim', country: 'Mexico'} {user: 'Darren', country: 'Mexico'}
I am creating an observable (RxJS) in NodeJS using ESM. Inside the observable I am performing a query with mongoose. I get the result, but the console returns e
We can build complex queries with Mongoose with options like $lte, $gt, $ne and so on... but I'm wondering where/how we should build those queries? If I have a
I have a collection where I store unique uID for a user and I also have to register them manually. While registration I pass multiple IDs in an array and now I
I have a business hours object in a mongoose schema that represent a date. I'm passing a json object and retrieving the to parse to Date as string. I wonder if
I am new in MongoDB, all my life I used MySQL. I have created an account in atlas, set the IP to my IP and created a user and saved the password. here is my cod
I am trying to build an application in my Express and anytime i navigate to the admin page i get this error const castError = new CastError();
So, I have a collection like this: [{ "name":String, "address":String, "hobby":Array of Strings }...] Every hour I query an API and get the response l