I have an application where I would like to have a user make custom named groups, Im having a hard time figuring out how to have them save properly to the database. At first I was going to have groups saved like,
groups: [
{family:{
type: mongoose.Schema.Types.ObjectId,
ref: "User"},
name: String,
email: String
},
{friends:{
type: mongoose.Schema.Types.ObjectId,
ref: "User",
name: String,
email: String
}
},
{colleagues:{
type: mongoose.Schema.Types.ObjectId,
ref: "User",
name: String,
email: String
}
}],
Then I realized that people should be able to add their own groups like work
college
or whatever they like.
I am using Mongoose and their schemaModels, so how can something like this mesh with Mongoose?
My application is using Node, so would I just to do...
User.findByIdAndUpdate(id, req.body.groupname,
{$push:req.body.group}, function(err, group){
blah
}
}
I just thought I would ask before opening up a can of worms, Im unsure if Mongoose would push back, or if $push is the right thing to use.
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
Just noobs question in smtp server administration, I had simple mail server local setup and is working fine for local networkI want to rent vps service and copy all my either dovecot and haraka setting project to vps for sending and receiving emails
I forked an npm package (https://githubcom/spark/particle-api-js), made some changes, used that in a project (https://github
I'm trying to build this package: https://githubcom/searchkit/searchkit/ (version v0
For my node js projects i typically have a textjson file and require it, instead of having static text within my code