node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »


mongo-provider - A simple wrapper for mongodb driver for NodeJS

Build Status


You can install this through npm: npm install mongo-provider

You can also install via git by cloning: git clone /path/to/mongo-provider


var MongoProvider = require('mongo-provider').MongoProvider;
var myCollectionProvider = new MongoProvider('server', port, 'MyDatabase', 'MyCollection');
provider.on("open", function (err, client) {
    // Do something with client

    // Don't forget to destroy the provider to cleanup and close the connection
    provider.destroy(function (err, client) {
        //Do something when destroyed