Switch worker template from TOML to JSONC format

This commit is contained in:
Aman Varshney
2025-06-17 10:49:44 +05:30
parent cce7f54d53
commit 2e56b27828
3 changed files with 23 additions and 18 deletions

View File

@@ -0,0 +1,5 @@
---
"create-better-t-stack": patch
---
Switch workers template from TOML to JSONC format

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
}

View File

@@ -1,18 +0,0 @@
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