-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
30 lines (30 loc) · 1.26 KB
/
Copy pathwrangler.jsonc
File metadata and controls
30 lines (30 loc) · 1.26 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
{
// Cloudflare Workers config. Hono runs natively here (no OpenNext adapter).
"$schema": "node_modules/wrangler/config-schema.json",
"name": "cut",
"main": "src/worker.ts",
"compatibility_date": "2024-12-30",
// nodejs_compat powers node:crypto (password hashing) and AsyncLocalStorage
// (Hono context storage, used to read the KV binding from lib/store).
"compatibility_flags": ["nodejs_compat"],
// Build the Tailwind CSS before bundling/deploying, so public/assets/styles.css
// exists for the assets upload below. Runs on `wrangler dev` and `wrangler
// deploy` — including the "Deploy to Cloudflare" button's deploy step.
"build": {
"command": "pnpm build:css"
},
// Static files (built CSS, client JS, icons) — served before the Worker.
"assets": {
"directory": "./public"
},
// Native storage. No "id" → the deploy button (and `wrangler dev`) auto-create
// the namespace and fill it in. Cut reads this binding via the request env.
"kv_namespaces": [
{
"binding": "CUT_KV"
}
]
// The only secret needed on Cloudflare is ADMIN_PASSWORD — the deploy button
// prompts for it from .dev.vars.example. No Upstash here: storage is the
// native KV namespace above, which never archives (so no keepalive cron).
}