In the spirit of noBackend, where we suggest that frontend developers use Dreamcode for functionalities their apps require and focus on what's unique to their apps instead, I'd like to implement our example app in exact the same way.
That means that instead of
App.on('invoice:save', handleInvoiceSave);
var handleInvoiceSave = function(invoice) {
invoices.setContent(invoice.id, invoice).then(function () {
console.log('saved to remotestorage!');
}, function (err) {
console.log('failed to save to remotestorage ', err, invoice);
});
};
we'd now do
// overwrite dreamcode with the real thing.
store.save = function(object) {
invoices.setContent(invoice.id, invoice).then(function () {
console.log('saved to remotestorage!');
}, function (err) {
console.log('failed to save to remotestorage ', err, invoice);
});
}
In the spirit of noBackend, where we suggest that frontend developers use Dreamcode for functionalities their apps require and focus on what's unique to their apps instead, I'd like to implement our example app in exact the same way.
That means that instead of
we'd now do
This pull request fixes #7