REST storage adapter for Tubbs
JavaScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
Makefile
README.md
TODO.md
index.js
package.json

README.md

Tubbs-RestStorage

Tubbs-RestStorage is a REST adaptor for Tubbs.

Example:

var Tubbs = require('tubbs');
var RestStorage = require('tubbs-reststorage');

var User = Tubbs.define({

  fields: {
    // ...
  },

  // Persist our data via Rest
  dataStore: {
    type: RestStorage,
    options: {
      url: '/users',
      headers: { 'X_CSRF_TOKEN': 'b0113d8b-a4b3-c7db-0ec4-c0eb9c02e3a3' }
    }
  }),

  // ...

});

User.fetch(function(e, result) {
  // User data is ready for use locally.
});

See Tubbs for more information.