Integrating With Your Backend
The PowerSync backend connector provides the connection between your application backend and the PowerSync managed database.
It is used to:
- 1.Retrieve a token to connect to the PowerSync instance.
- 2.Apply local changes on your backend application server (and from there, to Postgres)
Accordingly, 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 Authentication Setup for instructions on how the credentials should be generated. - 2.
uploadData()
— Use this to upload client-side changes to your app backend.
Refer to Create a Backend Connector on the React Native & Expo SDK reference page for example implementations of
fetchCredentials()
and uploadData()
Refer to Create a Backend Connector on the JS Web reference page for example implementations of
fetchCredentials()
and uploadData()
Last modified 13d ago