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
- Host: GitHub
- URL: https://github.com/urbanhire/monggo
- Owner: urbanhire
- Created: 2019-11-10T19:14:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-11T08:03:12.000Z (over 5 years ago)
- Last Synced: 2025-01-15T23:30:21.588Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
monggo
A mongodb connection pooling wrapper of mongodb native drive.
---
### Installing
```
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](https://www.mongodb.com/) - Database
- [@gsoultan](https://github.com/gsoultan) - Idea & Initial work