1.0.3 • Published 6 years ago

quick-mongodb-node v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

quick-mongodb-node

Simplify mongo usage a little, not big deal.

npm npm bundle size CircleCI Coveralls github

😈 A static variable is used in this package

šŸŒ Note that this package use MONGO_URL as an environment variable.

API and example

const database = require('quick-mongodb-node')

// - connect to the database
// - switch do `my-db` db
// - retrieve the mongodb `my-collection` collection
let collection = await database.getCollection('my-db/my-collection')

// - will NOT connect to the database (already done the line before)
// - switch do `my-db2` db
// - retrieve the mongodb `my-collection2` collection
let collection2 = await database.getCollection('my-db2/my-collection2')

// close the connection
await database.close()
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago