monggo

1.0.4 • Public • Published

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

Package Sidebar

Install

npm i monggo

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

2.64 kB

Total Files

3

Last publish

Collaborators

  • techurbanhire
  • fahriachmadi
  • riskinputra
  • gsoultan