From 5bc62439a8b6c0ec5ccd5a0c66790c01936dacdc Mon Sep 17 00:00:00 2001 From: Paul Mulligan Date: Thu, 9 Apr 2026 17:15:56 -0400 Subject: [PATCH] feat: add .dev.vars.example to Cloudflare Workers project setup Cloudflare Workers uses .dev.vars for local environment variables (equivalent to .env). New users setting up a Workers project now get a reference file with ENVIRONMENT, LOG_LEVEL, and DATABASE_URL examples. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/setup-project.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/setup-project.sh b/scripts/setup-project.sh index ac60067..a42ada7 100644 --- a/scripts/setup-project.sh +++ b/scripts/setup-project.sh @@ -319,6 +319,18 @@ if [[ "$PLATFORM" == "cloudflare" ]]; then step "Setting up Cloudflare Workers..." run_cmd pnpm add -D wrangler copy_file "$TEMPLATES_DIR/cloudflare-workers/wrangler.toml" "$API_DIR/wrangler.toml" + + write_file "$API_DIR/.dev.vars.example" << 'DVEOF' +# .dev.vars — Cloudflare Workers local environment variables +# This is the Workers equivalent of .env for local development. +# Copy this file to .dev.vars and fill in your values: +# cp .dev.vars.example .dev.vars + +ENVIRONMENT=development +LOG_LEVEL=debug +DATABASE_URL=postgresql://nerva:nerva_secret@localhost:5432/nerva_db +DVEOF + success "Cloudflare Workers configured. Edit wrangler.toml with your resource IDs." else step "Setting up Node.js / Docker..."