tldraw/apps/dotcom-worker
Kumi 43419581be
Some checks are pending
Checks / Tests & checks (push) Waiting to run
Checks / Build all projects (push) Waiting to run
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Waiting to run
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Waiting to run
End to end tests / End to end tests (push) Waiting to run
Publish Canary Packages / Publish Canary Packages (push) Waiting to run
Publish VS Code Extension / Publish VS Code Extension (push) Waiting to run
feat: migrate data persistence from Supabase to Postgres
Switched from Supabase to Postgres for handling database
operations related to room snapshots and drawings. This change
involves updating the imports and persistence logic in various
components to utilize Postgres instead of Supabase.

Benefits include improved performance and greater control over
database operations. Added connection and query handling for
Postgres in the utility function.

Includes:
- Updated imports and logic in TLDrawDurableObject
- Changes in getRoomSnapshot to use Postgres
- New createPostgresClient utility function for DB connection
2024-07-16 21:11:07 +02:00
..
src feat: migrate data persistence from Supabase to Postgres 2024-07-16 21:11:07 +02:00
.gitignore unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00
CHANGELOG.md unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00
package.json [4/5] sync -> sync-core, sync-react -> sync (#4123) 2024-07-10 16:09:10 +00:00
README.md unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00
tsconfig.json [4/5] sync -> sync-core, sync-react -> sync (#4123) 2024-07-10 16:09:10 +00:00
wrangler.toml add workers-shared package and source-maps for dotcom-worker sentry reports (#4052) 2024-07-02 09:10:20 +00:00

@tldraw/tlsync-worker

Enable database persistence for local dev

The values for env.SUPABASE_KEY and env.SUPABASE_URL are stored in the Cloudflare Workers dashboard for this worker. However we use --local mode for local development, which doesn't read these values from the dashboard.

To workaround this, create a file called .dev.vars under merge-server with the required values (which you can currently find at https://app.supabase.com/project/bfcjbbjqflgfzxhskwct/settings/api). This will be read by wrangler dev --local and used to populate the environment variables.

SUPABASE_URL=<url>
SUPABASE_KEY=<key>