fendjs-model-mongo

MongoDB model plugin for Fend.js

npm install fendjs-model-mongo
4 downloads in the last week
8 downloads in the last month

fendjs-model-mongo

Build Status Coverage Status NPM version Dependency Status

MongoDB model plugin for Fend.js

Usage

var Modeler = require('fendjs-model');
var Mongorable = require('fendjs-model-mongo');

Modeler.use(Mongorable('mongodb://localhost/test'));

var Pet = Modeler('Pet')
  .attr('id')
  .attr('name');

var pet = new Pet({ name: 'Tobi', species: 'Ferret' });
pet.save(function (err, res) {
  if (err) {
    // Error something todo ...
    return;
  }
  // Something todo ...
});

API

TODO:

Testing

$ npm install
$ make test

License

MIT license.

See the LICENSE.

Bitdeli Badge

npm loves you