How to call multiple Database table in same Model JS File Let's Say
var mongoose = require('./node_modules/mongoose');
mongoose.connect('mongodb://localhost/_db1');
module.exports = exports = mongoose;
// I know this overwrites
// Something like calling with different variable name
// Say mongoosedb1, mongoosedb2
// Still if do that we have to pass the library to both variables
// Any other possible ways??
mongoose.connect('mongodb://localhost/_db2');
module.exports = exports = mongoose;
I am not sure whether this is making sense, Could you anyone please give some suggestions, I am new to this MEAN Stack framework.
Thanks in Advance!!