add cloudflare workers support (#326)

This commit is contained in:
Aman Varshney
2025-06-16 22:55:26 +05:30
committed by GitHub
parent 5fc1ba164e
commit b34e94a09e
34 changed files with 556 additions and 538 deletions

View File

@@ -0,0 +1,18 @@
name = "{{projectName}}-server"
main = "src/index.ts"
compatibility_date = "2025-06-15"
compatibility_flags = ["nodejs_compat"]
[vars]
NODE_ENV = "production"
# Non-sensitive environment variables (visible in dashboard)
# CORS_ORIGIN = "https://your-frontend-domain.com"
# BETTER_AUTH_URL = "https://your-worker-domain.workers.dev"
# ⚠️ SENSITIVE DATA: Use `wrangler secret put` instead of adding here
# Don't put these in [vars] - they'll be visible in the dashboard!
# - DATABASE_URL
# - DATABASE_AUTH_TOKEN
# - GOOGLE_GENERATIVE_AI_API_KEY
# - BETTER_AUTH_SECRET