Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions installation/app-backend-setup/writing-client-changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ title: "Writing Client Changes"
description: "Your app backend needs to expose an API endpoint to write changes to your backend database that are received from the PowerSync client."
---

<Info>
The backend receives the changes from your `uploadData` function in the `PowerSyncBackendConnector` on the client.
</Info>

This could be:

1. A single endpoint accepting a batch of changes from the client, with minimal client-side processing.
2. Separate endpoints based on the types of changes.
3. A combination of the above.

For details of the client-side interface to your backend, see [Integrating With Your Backend](/installation/client-side-setup/integrating-with-your-backend).

<Warning>
It's important that your endpoint be blocking/synchronous with underlying Postgres or MongoDB writes.

Expand Down Expand Up @@ -63,3 +65,11 @@ For details on handling write conflicts, see:
horizontal
/>
</CardGroup>

### Example implementations

We have some example backend implementations that you can use as a guide for your implementation:

#### <Icon icon="js" iconType="solid" size="24"/> [NodeJS](https://github.com/powersync-ja/powersync-nodejs-backend-todolist-demo)

#### <Icon icon="python" iconType="solid" size="24"/> [Django](https://github.com/powersync-ja/powersync-django-backend-todolist-demo)
Loading