Socket
Socket
Sign inDemoInstall

pongo

Package Overview
Dependencies
218
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pongo

Connection pooling for node-mongodb-native


Version published
Weekly downloads
106
increased by24.71%
Maintainers
1
Install size
9.20 MB
Created
Weekly downloads
 

Readme

Source

pongo

Connection pooling for node-mongodb-native.
No more sockets are opened, as defined in the server.poolSize option.

####Requirements node-mongodb-native

####Installation npm install pongo

####Example var Pongo = require('pongo');

var pongo = new Pongo({
    
    // mongodb connection
    host: "127.0.0.1",
    port: 27017,
    
    // maximal number of callbacks that are buffered, while a connection is established to mongodb.
    // increase the number, if you get the error message: "Number of callbacks in buffer exceeded".
    bufferSize: 100,

    // list of valid server options:
    // http://mongodb.github.com/node-mongodb-native/api-generated/server.html?highlight=server#server
    server: {
        poolSize: 3
    },
    
    // list of valid db options:
    // http://mongodb.github.com/node-mongodb-native/api-generated/db.html?highlight=db#db
    db: {
        w: 1
    }
});

pongo.connect('myMongoDb', function (err, db) {
  // use the db instance as you would with the node-mongodb-native driver.
});

pongo.connect('myOtherMongoDb', function (err, db) {
  // use the db instance as you would with the node-mongodb-native driver.
});

####License MIT

Keywords

FAQs

Last updated on 01 Aug 2013

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc