Skip to content

Commit c58db3c

Browse files
author
Amine
committed
feat: add environment configuration template and sync rules for Nuxt Supabase Todo List demo
1 parent 3521b82 commit c58db3c

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Self-hosted Environment Configuration
2+
# Copy this template: `cp .env.template .env`
3+
# Edit .env and enter your Supabase and PowerSync project details.
4+
5+
NUXT_PUBLIC_SUPABASE_URL=http://localhost:54321
6+
NUXT_PUBLIC_SUPABASE_ANON_KEY=<replace-with-your-anon-key>
7+
# PowerSync Configuration
8+
NUXT_PUBLIC_POWERSYNC_URL=http://localhost:6000
9+
10+
11+
# If using Powersync Cloud or a Cloud source database uses these
12+
# Supabase Configuration
13+
# VITE_SUPABASE_URL=https://<your-project-id>.supabase.co
14+
# VITE_SUPABASE_ANON_KEY=<replace-with-your-anon-key>
15+
16+
# PowerSync Configuration
17+
# VITE_POWERSYNC_URL=https://<your-project-id>.powersync.journeyapps.com
18+
19+
# Self-hosted PowerSync Configuration
20+
PS_POSTGRESQL_URI=postgresql://postgres:postgres@supabase_db_powersync:5432/postgres
21+
PS_SUPABASE_JWT_SECRET=super-secret-jwt-token-with-at-least-32-characters-long
22+
PS_API_TOKEN=super-secret
23+
PS_PORT=6000
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
config:
2+
edition: 2
3+
4+
bucket_definitions:
5+
tasks:
6+
parameters:
7+
- SELECT request.user_id() AS user_id
8+
data:
9+
- SELECT * FROM tasks WHERE tasks.user_id = bucket.user_id

0 commit comments

Comments
 (0)