Search code examples
dexiedreamfactory

Can Dexie syncable be used with an api server vs directly with a database


I have seen the sample projects on your website for Dexie.Syncable such as sync-server and sync-client and they all seem to write to a datbase directly vs interacting with a web api. I am looking for a little help in where to get started beyond the examples on the website. The api I am trying to write a gateway for is dreamfactory

Also it looks like version 2 beta has had many improvements to Dexie.Syncable


Solution

  • I would recommend to build a new server-project based on either WebSocketSyncServer.js or the github repo of sync-server. However, I cannot give the details on how to call REST APIs instead of working directly towards database or memory. I would suggest using ES2016 async/await since your API calls are asynchronic.

    Maybe you could try getting more help on https://github.com/nponiros/sync_server by filing an issue there.