1.0.2 • Published 3 years ago

mongo-service v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

MongoService

Is an util to manage mongodb connection ussing singleton design patter

Requires

  • mongodb ^4.13.0
// Pass values to local variables that will be used to create intance and connection
initVars(urlConnection, dataBaseName, useNewUrlParser, unifiedTopology)
// Return a promise after try to connect and init database
getInstance()
// One connected use it get db instance to invoque db methods .find, .updateMany 
getDb()
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

7 years ago