Closed gofreddo closed 6 years ago
Hi Jeff,
thanks for correcting the readme :-) Also you updated the mongoose version. I will accept the pull and update the npm version to 0.4.0 because of the mongoose version change.
Regards Felix
thanks
new version is online on npm
awesome thanks.
I updated the Mongoose version.
We found the readme had errors. When you pass in a string to mongooseMulti.start it does a require that is relative to ./node_modules/mongoose-multi and can't find your path. Using mongooseMulti.start(dbConfig, node.env.PWD + './schemas.js'); corrects this issue.
Also dbConfig wants an object like: { "application": 'mongodb://localhost:27017/application', "book": 'mongodb://localhost:27017/books' }
Your Network config file example exports { "db":{ "application": 'mongodb://localhost:27017/application', "book": 'mongodb://localhost:27017/books' } }
Either it should skip the "db": and just export the correct object or dbConfig = require('./config.js') should be dbConfig = require('./config.js').db
Thanks for the repo though. Other than those issues it is working great.