Socket
Book a DemoInstallSign in
Socket

mongo-micro-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-micro-wrapper

A tiny wrapper to initialize and return db connection.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

mongo-micro-wrapper

Description: A micro wrapper to init a db and collection. * now caches connections.

##Example npm install mongo-micro-wrapper

var db = require('mongo-micro-wrapper');
var dbOBJ = new db({url: 'YOURURL',collection:'collectionname'});

dbOBJ.init(function(err,r) {
    console.log(err,r)
    //OUTPUT contains db object and collection as r.db & r.collection
});

###Config options:

url:url of your mongo db *either this is required or the three options below.

user:username that has db access.

password: password to user.

url_end: all the url AFTER the @

collection: the collection you are using *if passed in will get both db and collection object back.

Keywords

mongo

FAQs

Package last updated on 09 Sep 2016

Did you know?

Socket

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