Skip to content

Miutcank/mongodb-promisified-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

MongoDB connector promisified with bluebird + connection retry logic

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published