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

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -