Skip to content

Use Backbone models with NeDB rather than a traditional database or network layer

License

Notifications You must be signed in to change notification settings

akonwi/backbone.nedb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Use Backbone models with NeDB rather than a traditional database or network layer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published