0.1.0 • Published 9 years ago

mongodb-promisified-connector v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

mongodb-promisified-connector

Node.js MongoDB connector promisified with bluebird.

Features

  • Promisified with bluebird
  • Lightweight, offers all functionality of the native MongoDB driver
  • Efficient, initiates a single connection at the first time you try to access a collection
  • Fault-tolerant, tries to reconnect if disconnected
  • Custom logging
  • Uses Proxy harmony feature (you must run node with --harmony_proxies argument)

Usage

var myCollection = require('mongodb-promisified-connector')('myCollectionName');
myCollection.find({})
  .then(function(resultArray) {
    // you will get the documents array
  });

ENV vars

MONGO_URL MongoDB connection string