feedhenry / fh-sync-js

Javascript implementation of the Feedhenry Data Synchronisation Client for browsers. To be used in conjunction with the FeedHenry Data Synchronisation Server.
http://feedhenry.org
Apache License 2.0
4 stars 15 forks source link

Figure out how to include fh-sync-js into fh-js-sdk #2

Closed wtrocki closed 7 years ago

wtrocki commented 7 years ago

We will need to release fh-sync-js as npm/bower component and then require it from fh-js-sdk. js-sdk then will contain custom cloud handler that will be using $fh.cloud


doCloudCall: function(params, success, failure) {
        $fh.cloud({
          'path' : '/mbaas/sync/' + params.dataset_id,
          'method' : 'post',
          'data' : params.req
        }, function(res) {
          callbackCalled = true;
          success(res);
        }, function(msg, err) {
          callbackCalled = true;
          failure(msg, err);
        });
      }
    }
  },
wtrocki commented 7 years ago

Refactored code so sync can be now included automatically by adding it to fh-js-sdk browserify chain. Actual work will involve:

wtrocki commented 7 years ago

Done small investigation for this task. Going to publish example application and include it into fh-js-sdk

wtrocki commented 7 years ago

See: https://github.com/feedhenry/fh-js-sdk/pull/209

wtrocki commented 7 years ago

Fixed