28 lines
914 B
TOML
28 lines
914 B
TOML
name = "sproutlink"
|
|
main = "src/index.ts"
|
|
compatibility_date = "2024-09-23"
|
|
compatibility_flags = ["nodejs_compat"]
|
|
account_id = "YOUR_CLOUDFLARE_ACCOUNT_ID"
|
|
|
|
# Static assets: Vite build output is uploaded to Cloudflare CDN separately from
|
|
# the Worker JS bundle — does NOT count toward the 4 MB Worker size limit.
|
|
[assets]
|
|
directory = "../web/dist"
|
|
# Serve index.html for any path that doesn't match a real file (SPA routing)
|
|
not_found_handling = "single-page-application"
|
|
|
|
# Routes handled by the Worker:
|
|
# /{4-char-code} → public redirect
|
|
# /{4-char-code}/verify → password form submit
|
|
# /api/* → REST API
|
|
# Everything else → served from static assets (the React SPA)
|
|
|
|
[[d1_databases]]
|
|
binding = "DB"
|
|
database_name = "sproutlink"
|
|
database_id = "YOUR_D1_DATABASE_ID"
|
|
|
|
# Non-secret vars (override in dashboard or via wrangler secret)
|
|
[vars]
|
|
ALLOWED_ORIGINS = "*"
|