Wednesday 13 April 2016

Some help with my mongoose schema?

Hello, I am trying to think of my database schemas that I want to use for my project I am working on while allowing them to grow in a smart way so that I dont have a tangled mess if the site grows.So right now I have a user, which has a password and a email ( for password recovery, but is optional)Now, I want the user to have a profile page which they can provide links to various things. Can mongo scale to where a user can add a custom link to their profile beyond the ones I define?So just to give an idea of how I see it, but not sure if its the proper way this is what I got.var userSchema = new mongoose.Schema({ username : String, password : String, email : String, social : { facebook : String, twitter : String, website : String, other : {} } })); I also want to allow a user to follow which I guess would be a new collection and just linking them with object ids.Any help would be appreciated.Thanks.

Submitted April 14, 2016 at 01:50AM by clandest

No comments:

Post a Comment