You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/postgresql/EXPO.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,24 @@ cd MyApp
16
16
17
17
### 2. Setup
18
18
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`.
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.
30
37
31
38
> **⚠️ SECURITY WARNING**: This example puts database connection strings directly in `.env` files for demonstration purposes only. **Do not use this pattern in production.**
0 commit comments