dcfc6da604
Adds an assets server to the demo worker, and reworks the existing asset server to use the same code. There are a few simplifications to the code due to some DX improvements working with R2 and caches. I also removed the `HEAD` request from the assets server: i took a look at our logs and it's not actually used at all. This also fixes an issue where users could overwrite the contents of the asset uploads bucket. ### Change type - [x] `other` |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
CHANGELOG.md | ||
package.json | ||
README.md | ||
tsconfig.json | ||
wrangler.toml |
@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>