Skip to content

anyTV/anytv-node-mongo

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

anytv-node-mongo

Build Status Coverage Status Documentation Dependencies npm version

Our version of mongoskin that makes connecting to mongo simpler. Especially made for our awesome expressjs boilerplate.

This module uses the popular mongoskin.

Install

npm install anytv-node-mongo --save

Features

  • Simpler connection with mongo.open(config)

Usage

Opening a connection

On your index.js / server.js / app.js, register your database using a key.

import mongo from 'anytv-node-mongo';

const config = {
	host: 'localhost',
	user: 'root',
	password: '',
	database: test
};

mongo.open(config)
	.collection('users')
	.findOne({_id: 'SOMEID'}, callback);

Documentation

Code documentation can be found here.

Contributing

Install the tools needed:

npm install babel -g
npm install esdoc -g
npm install mocha -g
npm install --dev

To compile the ES6 source code to ES5:

babel src --watch --out-dir lib

To generate the docs:

npm run docs

Running test

npm test

Code coverage

npm run coverage

Then open coverage/lcov-report/index.html.

License

MIT

Author

Freedom! Labs, any.TV Limited DBA Freedom!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published