Skip to content

a MongoDB connection pooling wrapper of MongoDB native driver

Notifications You must be signed in to change notification settings

urbanhire/monggo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Monggo

monggo

A mongodb connection pooling wrapper of mongodb native drive.


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

✍️ Authors

About

a MongoDB connection pooling wrapper of MongoDB native driver

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published