Tuesday 1 December 2015

Mongoose & Connection Pool Sharing

I'm having a hard time figuring out how to use connection pool sharing properly.Folder structure is:bin/config/models/public/routes/src/views/app.jsSome of my relevant files for my problem are:app.jsRoutes:modelModels:modelaccountMongo Config:configIn my mongo config file, if I change the db option to whichever database I'm querying, it works for that database, but not the other.For example, I have some dummy data in a database named dummy. If I go to localhost/dummy, the data is shown. But if I change the db option to users and go to localhost/dummy, all I get is [].For my setup, how do I tell Mongoose to use the appropriate database for each Schema?

Submitted December 01, 2015 at 06:25PM by krypt_o

No comments:

Post a Comment