Skip to content
The easiest MongoDB API
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
src
.gitignore
Cakefile
package.json
readme.md

readme.md

Easy Mongo

It's a small exstension for mongodb package.

var easymongo = require('easymongo');

var mongo = new easymongo({db: 'test'});

mongo.find('users', {name: 'Alexey'}, function(results) {
  console.log(results); // false if not found
});

mongo.save('users', {name: 'Alexey', surname: 'Simonenko'}, function(results) {
  console.log(results); // new mongo document
});

Install with NPM

npm install easymongo

API

  • getInstance (table, callback)
  • findById (table, id, callback)
  • find (table, params, callback)
  • save (table, params, callback)

Author

Something went wrong with that request. Please try again.