tubbs-reststorage

REST adaptor for Tubbs

npm install tubbs-reststorage
32 downloads in the last month

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.

npm loves you