-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
66 lines (60 loc) · 1.58 KB
/
wrangler.jsonc
File metadata and controls
66 lines (60 loc) · 1.58 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
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "hookforms",
"main": "src/index.ts",
"compatibility_date": "2026-02-08",
"compatibility_flags": ["nodejs_compat"],
// D1 database for inboxes, events, API keys
"d1_databases": [
{
"binding": "DB",
"database_name": "hookforms-db",
"database_id": ""
// After deploy: wrangler d1 create hookforms-db
// Then paste the database_id here
}
],
// KV namespace for rate limiting
"kv_namespaces": [
{
"binding": "RATE_LIMIT",
"id": ""
// After deploy: wrangler kv namespace create RATE_LIMIT
// Then paste the id here
}
],
// R2 bucket for Gmail OAuth token persistence
"r2_buckets": [
{
"binding": "STORAGE",
"bucket_name": "hookforms-storage"
}
],
// Queue for async email sending
"queues": {
"producers": [
{
"binding": "EMAIL_QUEUE",
"queue": "hookforms-emails"
}
],
"consumers": [
{
"queue": "hookforms-emails",
"max_batch_size": 5,
"max_retries": 3,
"dead_letter_queue": "hookforms-emails-dlq"
}
]
},
// Daily cleanup of old events (3am UTC)
"triggers": {
"crons": ["0 3 * * *"]
}
// Required secrets (set via wrangler secret put):
// ADMIN_API_KEY — master admin key
// GMAIL_CLIENT_ID — Google OAuth client ID
// GMAIL_CLIENT_SECRET — Google OAuth client secret
// GMAIL_REFRESH_TOKEN — OAuth refresh token (from gmail_auth script)
// GMAIL_SENDER_EMAIL — the Gmail address to send from
}