Integrating With Your Backend
The
PowerSyncBackendConnector
class provides the connection between your application backend and the PowerSync managed database. It is used to apply local changes on the backend application server, and to retrieve a token to connect to the PowerSync instance.The connector must implement two methods:
- 1.
fetchCredentials()
This is called every couple of minutes and is used to obtain credentials for your app backend API. See Generate JWT for instructions on how the credentials should be generated. - 2.
uploadData()
Use this to upload client-side changes to the app backend. See Writing client changes for considerations on the app backend implementation.
Last modified 2mo ago