Answer the question
In order to leave comments, you need to log in
Is it advisable to use the Repository pattern when developing with nodejs?
If, when implementing Mongoose, some of the properties of the pattern are transferred to the database models?
Answer the question
In order to leave comments, you need to log in
Are you talking about this?
// define an Actor model with this mongoose instance
mongoose.model('Actor', new Schema({ name: String }));
// create a new connection
var conn = mongoose.createConnection(..);
// retrieve the Actor model
var Actor = conn.model('Actor'); // repository??
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question