Miss any of our Open RFC calls?Watch the recordings here! »

resourceful-mongo

0.0.3 • Public • Published

resourceful-mongo Build Status

A MongoDB engine for resourceful, a datamapper part of the flatiron project.

Credits

Ryan Fitzgerald, Follow @TheRyanFitz on Twitter.

Warning

This project is in a very early stage, with limited functionality. Don't use in production.

Example

  var resourceful = require('resourceful-mongo');
  
  var Person = resourceful.define('person', function () {
    //
    // Specify use of the mongodb engine
    //
    this.use('mongodb', {
      database: 'flatiron_test', //required - databasename which contains collections
      collection: "people", // required - the collection to use for this resource
      safe : true // optional - run the driver in safe mode to ensure that the update succeeded. Defaults to false
    });
    
    this.string('name');
    this.number('age');
  });

Installation

Installing npm (node package manager)

  $ curl http://npmjs.org/install.sh | sh

Installing resourceful

  $ [sudo] npm install resourceful-mongo

Tests

All tests are written with mocha and should be run with npm:

  $ npm test

Author: Ryan Fitzgerald

License: Apache 2.0

Keywords

none

Install

npm i resourceful-mongo

DownloadsWeekly Downloads

2

Version

0.0.3

License

none

Last publish

Collaborators

  • avatar
  • avatar