@akeating-redhat/fh-sync-js
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

FeedHenry Sync Javascript client

Data synchonization javascript client. Library can be used for offline storage of mobile applications data.

Required setup

To use the sync client you need a sync server setup first see https://github.com/feedhenry/fh-sync or https://github.com/feedhenry/fh-sync-server. Sync client using default Ajax handler to call sync server.
Server URL can be configured using following variables

  • cloudUrl - URL to sync server
  • cloudPath (optional) - allows to use custom endpoint for sync (defaults to /sync/)

For example:

syncClient.init({
    cloudUrl:"http://localhost:3000",
    do_console_log: true,
    sync_frequency: 1,
    sync_active: false,
    storage_strategy: ['memory'],
    crashed_count_wait: 0
});

Building

npm install
grunt 

Cordova client template

You can try Cordova Sync Template. It uses fh-sync-js as a library for connecting to running sync server instance.

Relation for fh-js-sdk

Feedhenry JS SDK contains various libraries and also includes fh-sync-js library.

Readme

Keywords

none

Package Sidebar

Install

npm i @akeating-redhat/fh-sync-js

Weekly Downloads

3

Version

1.1.1

License

Apache 2.0

Last publish

Collaborators

  • akeating-redhat