An open API service indexing awesome lists of open source software.

https://github.com/urbanhire/monggo

a MongoDB connection pooling wrapper of MongoDB native driver
https://github.com/urbanhire/monggo

Last synced: 3 months ago
JSON representation

a MongoDB connection pooling wrapper of MongoDB native driver

Awesome Lists containing this project

README

        



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

- [MongoDB](https://www.mongodb.com/) - Database

## ✍️ Authors

- [@gsoultan](https://github.com/gsoultan) - Idea & Initial work