-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
62 lines (54 loc) · 1.23 KB
/
wrangler.jsonc
File metadata and controls
62 lines (54 loc) · 1.23 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
{
"$schema": "node_modules/wrangler/config-schema.json",
// Worker 名称
"name": "openbiocard",
// 必须存在,且不要用未来日期
"compatibility_date": "2025-08-03",
// Worker 入口文件
"main": "./apps/backend/index.tsx",
// 静态资源(前端构建产物)
"assets": {
"directory": "./apps/backend/dist/client",
"binding": "ASSETS"
},
// 观测 / 日志(你原来的配置,保留)
"observability": {
"logs": {
"enabled": false,
"head_sampling_rate": 1,
"invocation_logs": true,
"persist": true
}
},
// Worker 环境变量
"vars": {
"ENVIRONMENT": "production",
"CORS_ALLOWED_ORIGINS": "*",
"CORS_ALLOWED_METHODS": "GET,POST,PUT,DELETE,OPTIONS",
"CORS_ALLOWED_HEADERS": "Content-Type,Authorization"
},
// Durable Objects 绑定
"durable_objects": {
"bindings": [
{
"name": "USER_DO",
"class_name": "UserDO"
},
{
"name": "ADMIN_DO",
"class_name": "AdminDO"
}
]
},
// DO 迁移记录(保持你现有的)
"migrations": [
{
"tag": "v1",
"new_sqlite_classes": ["UserDO"]
},
{
"tag": "v2",
"new_sqlite_classes": ["AdminDO"]
}
]
}