Rapidfacture / mongoose-multi

NPM Module: Create Mongoose connections to severals DBs; short, mongoDB like syntax for requests.
12 stars 4 forks source link

what is best way to close the connections? #8

Closed mergingseas closed 5 years ago

mergingseas commented 5 years ago

I am currently doing...

db.{db_name}.mongooseConnection.close();

is that the right way?

FelixFurtmayr commented 5 years ago

yes, as you will just use the mongoose function "mongoose.connection.close()".

db.{db_name}.mongooseConnection is just the original mongoose connection, just use it this way.

mergingseas commented 5 years ago

ok thanks!