monggo
v1.0.4
Published
Monggo is a connection pooling for mongodb based on the singleton pattern on node js. This package is a wrapper of mongodb native driver package
Downloads
6
Readme
Installing
npm i monggo
🎈 Usage
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()
⛏️ Built Using
- MongoDB - Database
✍️ Authors
- @gsoultan - Idea & Initial work