Socket
Book a 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

latest
npmnpm
Version
1.0.4
Version published
Weekly downloads
5
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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.