BackboneMongo provides MongoDB storage for BackboneORM.
Because BackboneORM's query language is based on MongoDB's query language, many queries just work! With a twist...Backbone.ORM provides cross-collection relationships and embedded data for MongoDB.
In addition, BackboneMongo using CouchDB-style '_rev' versioning to ensure coherency of data.
Examples (CoffeeScript)
model_name: 'Change' sync: require'backbone-orm'syncChange urlRoot: 'mongodb://localhost:27017/tasks' schema: : -> 'belongsTo'Project : -> 'hasMany'Changeembed: true sync: require'backbone-mongo'syncTask urlRoot: 'mongodb://localhost:27017/projects' schema: : -> 'hasMany'Task : -> 'hasMany'Changeembed: true sync: require'backbone-mongo'syncProject
Examples (JavaScript)
var Change = BackboneModel;Taskprototypesync = ; var Task = BackboneModel;Taskprototypesync = ; var Project = BackboneModel;Projectprototypesync = ;
Please checkout the website for installation instructions, examples, documentation, and community!
For Contributors
To build the library for Node.js:
$ gulp build
Please run tests before submitting a pull request:
$ gulp test --quick
and eventually all tests:
$ npm test