backbone.nedb
v0.0.2
Published
Use Backbone models with NeDB rather than REST server database
Downloads
1
Readme
backbone.nedb
Use Backbone models with NeDB rather than REST server database. This came out of a need to use Backbone inside of a node-webkit app I'm working on and I wanted a simple database management system. NeDB is just the right size.
Currently...
This is a very simplified and alpha setup right now and it is just a replacement Backbone.sync method. Only the basic CRUD operations have been implemented at the moment because I haven't found a need for the extra fixin's and options.
Setup
The module is a function that takes the Backbone object and stuffs it with a new sync method
require('backbone.nedb')(Backbone)
In order to interact with the database, it needs to be in the global scope as db
. Perhaps in the future that will change and the database won't have to be hard coded as 'db' and allow for multiple datastores and the sync method will determine the correct one to work with.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request