Skip to content

Commit 58ce9a4

Browse files
authored
Update EXPO.md
1 parent 37eb38d commit 58ce9a4

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

docs/postgresql/EXPO.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,24 @@ cd MyApp
1616

1717
### 2. Setup
1818

19-
1. Execute the exact schema from `to-do-app.sql`.
20-
2. Rename the `.env.example` into `.env` and fill with your values.
21-
3. If you're testing with a local server define also the `ANDROID_CONNECTION_STRING` variable and use a different connection string for it, replace localhost with `10.0.2.2`.
19+
1. Execute the exact schema from [`to-do-app.sql`](../../examples/to-do-app/to-do-app.sql).
20+
2. Enable CloudSync for all tables on the remote database with:
21+
```sql
22+
CREATE EXTENSION IF NOT EXISTS cloudsync;
23+
SELECT cloudsync_init('tasks');
24+
SELECT cloudsync_init('tags');
25+
SELECT cloudsync_init('tasks_tags');
26+
```
27+
3. Rename the `.env.example` into `.env` and fill with your values.
28+
4. If you're testing with a local server define also the `ANDROID_CONNECTION_STRING` variable and use a different connection string for it, replace localhost with `10.0.2.2`.
2229
2330
```
2431
CONNECTION_STRING="http://localhost:8091/postgres"
2532
ANDROID_CONNECTION_STRING="http://10.0.2.2:8091/postgres"
2633
API_TOKEN="token"
2734
```
2835
29-
4. Fill the `API_TOKEN` variable with the token from the `CloudSync` service.
36+
5. Fill the `API_TOKEN` variable with the access token from the [`CloudSync`](CLOUDSYNC.md) service.
3037
3138
> **⚠️ SECURITY WARNING**: This example puts database connection strings directly in `.env` files for demonstration purposes only. **Do not use this pattern in production.**
3239
>

0 commit comments

Comments
 (0)