🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

monggo

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monggo

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

1.0.4
latest
npm
Version published
Weekly downloads
28
1300%
Maintainers
2
Weekly downloads
 
Created
Source

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 - Database

✍️ Authors

Keywords

connection pooling

FAQs

Package last updated on 11 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts