happ-mongo

0.0.1 • Public • Published

HAPP-Mongo

Databases & collections

var db = $.mongo({
    host: 'localhost',
    db: 'aeeauto'
});

var users = db.list('users');

var lists = db.lists(['users', 'files', 'images']);

List methods

users.create({
    username: 'mike',
    email: 'mike@gmail.com'
}).then(function (user) {
    // ...
});

users.filter({
    email: 'mike@gmail.com'
}).then(function (users) {
    // ...
});

users.get({
    email: 'mike@gmail.com'
}).then(function (user) {
    // ...
});

users.remove({
    email: 'mike@gmail.com'
}).then(function (count) {
    // ...
});

Item methods

user.save({
    email: 'new@email.com'
}).then(function (user) {
    // ...
});

user.remove().then(function () {
    // ...
});

Readme

Keywords

none

Package Sidebar

Install

npm i happ-mongo

Weekly Downloads

2

Version

0.0.1

License

none

Last publish

Collaborators

  • ciphrus