Skip to content

Kevnz/mongo-start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Mongo-Start

A simple mongojs wrapper to return a collection so you don't need to write the same thing over and over.

To configure the connection you can create an environment variable called "mongo-connection". However since mongo-start uses qconf you can store the setting anywhere that qconf lets you.

const users = require('mongo-start')('users'); //mongojs collection
users.find({...}, (err, collection) => {
  //do stuff
});
const db = require('mongo-start')(); //mongojs db object
db.getCollectionNames((err, collectionNames) => {
  //collections in the db
});

About

Simple wrapper to get a mongojs collection back

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published