Mongoose: is it right to use one connection for every module? -


I have some modules that actually define RS services to MONODB for various organizations.

1) I can make connections in each module, var mangoes = ('mongos'); Mongoose.connect (mongoURL);

2) I can make a connection outside of a module and then pass it as a parameter

What is the best way?


Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -