Skip to content

Mongobine is a simple wrapper around javascript mongodb driver offering easy to use basic CRUD operations

Notifications You must be signed in to change notification settings

dhiraj1site/mongobine

Repository files navigation

MongoBine

Mongobine is a simple wrapper around javascript mongodb driver. It offers basic CRUD operations

Installation

npm install mongobine

How to use

var mongobine = require('mongobine');

// create a new mongo instance passing your connection details
var mongo = new mongobine({collection: 'users', url: 'mongodb://localhost:27017', document: 'binebox'});

// Allows you to basic simple CRUD operations for mongodb

//create
mongo.insert({email: "[email protected]"});

//retrieve
mongo.find({email: "[email protected]"});

//update
mongo.update({email : "[email protected]"}, {code: 23}).then(res => {
    console.log('got the update response', res);
});

//delete
mongo.delete({email: "[email protected]"});

About

Mongobine is a simple wrapper around javascript mongodb driver offering easy to use basic CRUD operations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published