Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Cloudflare platform skill covering Workers, D1, R2, KV, AI, Durable Objects, and security.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/c3/configuration.md
1# C3 Generated Configuration23## Output Structure45```6my-app/7├── src/index.ts # Worker entry point8├── wrangler.jsonc # Cloudflare config9├── package.json # Scripts10├── tsconfig.json11└── .gitignore12```1314## wrangler.jsonc1516```jsonc17{18"$schema": "https://raw.githubusercontent.com/cloudflare/workers-sdk/main/packages/wrangler/config-schema.json",19"name": "my-app",20"main": "src/index.ts",21"compatibility_date": "2026-01-27"22}23```2425## Binding Placeholders2627C3 generates **placeholder IDs** that must be replaced before deploy:2829```jsonc30{31"kv_namespaces": [{ "binding": "MY_KV", "id": "placeholder_kv_id" }],32"d1_databases": [{ "binding": "DB", "database_id": "00000000-..." }]33}34```3536**Replace with real IDs:**37```bash38npx wrangler kv namespace create MY_KV # Returns real ID39npx wrangler d1 create my-database # Returns real database_id40```4142**Deployment error if not replaced:**43```44Error: Invalid KV namespace ID "placeholder_kv_id"45```4647## Scripts4849```json50{51"scripts": {52"dev": "wrangler dev",53"deploy": "wrangler deploy",54"cf-typegen": "wrangler types"55}56}57```5859## Type Generation6061Run after adding bindings:62```bash63npm run cf-typegen64```6566Generates `.wrangler/types/runtime.d.ts`:67```typescript68interface Env {69MY_KV: KVNamespace;70DB: D1Database;71}72```7374## Post-Creation Checklist75761. Review `wrangler.jsonc` - check name, compatibility_date772. Replace placeholder binding IDs with real resource IDs783. Run `npm run cf-typegen`794. Test: `npm run dev`805. Deploy: `npm run deploy`816. Add secrets: `npx wrangler secret put SECRET_NAME`82