A mongodb connection pooling wrapper of mongodb native drive.
npm i monggo
var monggo = require('monggo')
const db = new monggo('mongodb://localhost:27017/dbname', 'dbname')
var collectionName = 'customers'
var customer = {
name: 'Polan',
address: 'Bintaro'
}
async function run() {
const database = await db.getConnection()
const r = await database.collection(collectionName).insertOne(customer)
console.log(r.insertedCount)
}
run()
- MongoDB - Database
- @gsoultan - Idea & Initial work