Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

wrangler.toml

34 lines1.2 KB

1#:schema node_modules/wrangler/config-schema.json
2​
3# Cloudflare Worker configuration for Code Mode execution
4# Run locally: wrangler dev (Dynamic Workers binding works in local workerd
5# on the Free plan; deploy/--remote require Paid)
6# Deploy: wrangler deploy
7​
8name = "tanstack-ai-code-mode"
9main = "src/worker/index.ts"
10compatibility_date = "2026-05-01"
11compatibility_flags = ["nodejs_compat"]
12​
13# worker_loader (Dynamic Workers) binding — loads LLM-generated code into a
14# fresh V8 isolate via env.LOADER.load(...). Replaces the previous
15# `unsafe_eval` binding, which Cloudflare gates for all customer prod
16# deploys. Workers Paid plan required to deploy or run --remote; local
17# wrangler dev works on the Free plan. Because this Worker evaluates
18# arbitrary JavaScript, protect the public endpoint with authentication and
19# rate limiting before deploying.
20[[worker_loaders]]
21binding = "LOADER"
22​
23# Local development settings
24[dev]
25port = 8787
26local_protocol = "http"
27​
28# Production settings (uncomment and configure for deployment)
29# [vars]
30# ALLOWED_ORIGINS = "https://your-app.com"
31​
32# Optional: Add authentication via Cloudflare Access
33# [env.production]
34# name = "tanstack-ai-code-mode-prod"