-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
84 lines (79 loc) · 2.63 KB
/
wrangler.jsonc
File metadata and controls
84 lines (79 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
"$schema": "../../node_modules/wrangler/config-schema.json",
// [METADATA]
// API worker accessed via service binding from web worker (no routes needed).
"name": "example-api",
"main": "./worker.ts",
"compatibility_date": "2025-08-15",
"compatibility_flags": ["nodejs_compat"],
"workers_dev": false,
"upload_source_maps": true,
// [ENV:PRODUCTION]
// Command: bun wrangler deploy
"vars": {
"ENVIRONMENT": "production",
"APP_NAME": "Example",
"APP_ORIGIN": "https://example.com",
"ALLOWED_ORIGINS": "https://example.com",
"RESEND_EMAIL_FROM": "onboarding@resend.dev"
},
// prettier-ignore
"hyperdrive": [
{ "binding": "HYPERDRIVE_CACHED", "id": "your-hyperdrive-cached-id-here" },
{ "binding": "HYPERDRIVE_DIRECT", "id": "your-hyperdrive-direct-id-here" }
],
"kv_namespaces": [],
"env": {
// [ENV:DEVELOPMENT]
// Command: bun wrangler dev
"dev": {
"vars": {
"ENVIRONMENT": "development",
"APP_NAME": "Example",
"APP_ORIGIN": "http://localhost:5173",
"ALLOWED_ORIGINS": "http://localhost:5173,http://127.0.0.1:5173",
"RESEND_EMAIL_FROM": "onboarding@resend.dev"
},
// prettier-ignore
"hyperdrive": [
{ "binding": "HYPERDRIVE_CACHED", "id": "your-dev-hyperdrive-cached-id-here" },
{ "binding": "HYPERDRIVE_DIRECT", "id": "your-dev-hyperdrive-direct-id-here" }
],
"kv_namespaces": []
},
// [ENV:STAGING]
// Command: bun wrangler deploy --env staging
"staging": {
"vars": {
"ENVIRONMENT": "staging",
"APP_NAME": "Example",
"APP_ORIGIN": "https://staging.example.com",
"ALLOWED_ORIGINS": "https://staging.example.com",
"RESEND_EMAIL_FROM": "onboarding@resend.dev"
},
// prettier-ignore
"hyperdrive": [
{ "binding": "HYPERDRIVE_CACHED", "id": "your-staging-hyperdrive-cached-id-here" },
{ "binding": "HYPERDRIVE_DIRECT", "id": "your-staging-hyperdrive-direct-id-here" }
],
"kv_namespaces": []
},
// [ENV:PREVIEW]
// Command: bun wrangler deploy --env preview
"preview": {
"vars": {
"ENVIRONMENT": "preview",
"APP_NAME": "Example",
"APP_ORIGIN": "https://preview.example.com",
"ALLOWED_ORIGINS": "https://preview.example.com",
"RESEND_EMAIL_FROM": "onboarding@resend.dev"
},
// prettier-ignore
"hyperdrive": [
{ "binding": "HYPERDRIVE_CACHED", "id": "your-preview-hyperdrive-cached-id-here" },
{ "binding": "HYPERDRIVE_DIRECT", "id": "your-preview-hyperdrive-direct-id-here" }
],
"kv_namespaces": []
}
}
}