mongodb-promisified-connector

0.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i mongodb-promisified-connector

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • miutcank