tubbs-reststorage
v0.0.7
Published
REST adaptor for Tubbs
Downloads
3
Readme
Tubbs-RestStorage
Tubbs-RestStorage is a REST adaptor for Tubbs.
Example:
var Tubbs = require('tubbs');
var RestStorage = require('tubbs-reststorage');
var User = Tubbs.create({
// 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.