Skip to content

Commit

Permalink
update embedded replica content
Browse files Browse the repository at this point in the history
  • Loading branch information
ruheni committed Nov 2, 2023
1 parent 57f40c2 commit 20f3198
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/300-guides/050-database/900-turso.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ Like a read replica setup you may be familiar with, write operations are forward
1. Database responds to the server with the updates from 1.
1. Write operations are propagated to the database replica.

To get started using embedded replicas with Prisma, add the `sync()` call in your application. For example, you can add the `sync()` method in your middleware to synchronize the data between your remote database and embedded replica.
How often to synchronize you need to synchronize data between your remote database and embedded replica is dependent on your application's data consistency needs. For example, you can use either middleware functions (e.g. Express and Fastify) or a cron job to synchronize the data.

For example, you can make the following change in your application if you're working with Express:
To get started using embedded replicas with Prisma, add the `sync()` method from libSQL in your application. The example below shows how you can synchronize data using Express middleware.

```ts highlight=5-8;add;
import express from 'express'
Expand Down

0 comments on commit 20f3198

Please sign in to comment.