node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »



mango_js is now mangos

Mangos.js is a simple module to make MongoDB syntax CRUD. It uses and exposes controls straight from MongoDB's Native driver

Documentation in the code!


npm install mangos

you can install it locally for development by doing this

git clone
cd ~/your_app
npm install ../mango_js

then in your code

// to include 
var Mangos = require('mangos');
//to use 
var userSet = new Mangos('users', 'localhost', 27017);
// or with a mongo uri 
var locations = new Mangos('locations', 'mongodb://');
// Dont do this the code is not synchronous 
userSet.create({name : 'Jacob'}, function(err, user){
  // if no error user is created 
});{name : 'Jacob'},function(err, users){
  console.log(users); // array of users with Jacob as name 
userSet.update({id : '50e3bdb52fc1c5d15a000001', status : 'active'}, function(err, user){
  // if no err user is updated 
userSet.delete('50e3bdb52fc1c5d15a000001', function(err, user){
  // if no error user is deleted 

Not enough control... well you can still use the native driver
// Mongo Db Native Driver Object 
userSet.db.collectionNames(function(err, names){