Integrate with your Backend
The PowerSync backend connector provides the connection between your application backend and the PowerSync client-slide managed SQLite database.
It is used to:
Retrieve a token to connect to the PowerSync instance.
Apply local changes on your backend application server (and from there, to Postgres)
Accordingly, the connector must implement two methods:
fetchCredentials()
— This is called every couple of minutes and is used to obtain credentials for your app backend API. See Authentication Setup for instructions on how the credentials should be generated.uploadData()
— Use this to upload client-side changes to your app backend.See Writing Client Changes for considerations on the app backend implementation.
Example implementation
For an example implementation of a backend connector, see the Getting Started section of the SDK reference for your platform:
More Examples
For additional implementation examples, see the Example / Demo Apps section.
Last updated