A simpler facade for mongodb node.js driver
npm i --save simple-mongo-driver
const Mongo = require('simple-mongo-driver')
let db = await Mongo.connect({ uri: 'mongodb://localhost:27017', name: 'test-database' })
let collection = db.collection('test-collection')
await collection.insertOne({ nice: 1 })
Check here for more.
isValidObjectId
getDatabase
isConnected,
connect
disconnect
dropDatabase
npm run lint
npm run test
Contributions will be highly appreciated.
Feel free to open any issues on any related matter.
Code released under the MIT.