Deployment
Both apps deploy to Cloudflare Workers with Wrangler. Here's the path from local to live.
1. Authenticate Wrangler
2. Create the D1 database
If you use a database-backed module, create a D1 database and copy its id:
Paste the returned database_id into apps/api/wrangler.jsonc, then apply migrations to the remote database:
3. Set production secrets
Push each secret to the deployed Worker. These are separate from your local .dev.vars:
Tip
ENVIRONMENT=production as a plain var so the API reference and dev-only tooling switch off.4. Deploy
Deploy both apps from the repo root:
Turbo runs each app's deploy script, which minifies and publishes the Worker. Point your custom domains at the two Workers from the Cloudflare dashboard.
5. Stripe webhook
If you use payments, add a webhook endpoint in the Stripe dashboard pointing at https://your-api-domain/api/stripe/webhook, then copy its signing secret into STRIPE_WEBHOOK_SECRET (step 3).
Note