Repository navigation
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
43 lines (38 loc) · 1.95 KB
/
Copy pathwrangler.jsonc
File metadata and controls
43 lines (38 loc) · 1.95 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
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "git4data-ai",
"compatibility_date": "2026-08-20",
// Playground and skill distribution APIs. Only /api/* reaches the Worker.
"main": "worker/index.js",
"compatibility_flags": ["nodejs_compat"],
"hyperdrive": [{ "binding": "HYPERDRIVE", "id": "f6ca605cdbbc4c0399310f4ab536d433" }],
"durable_objects": { "bindings": [{ "name": "SITE_ANALYTICS", "class_name": "SiteAnalytics" }] },
"migrations": [{ "tag": "site-analytics-v1", "new_sqlite_classes": ["SiteAnalytics"] }],
"ratelimits": [{ "name": "ANALYTICS_LIMIT", "namespace_id": "2026092601", "simple": { "limit": 60, "period": 60 } }],
"triggers": { "crons": ["*/10 * * * *"] },
// Binds both hostnames on every deploy and creates their DNS records, so the
// site is never one forgotten dashboard click away from being dark.
//
// www serves the same assets rather than 301-ing to the apex. Routing it
// through the Worker would put every page view on the invocation meter, which
// is exactly what run_worker_first below is scoped to avoid. The canonical
// tags already point search engines at the apex; for a real redirect add a
// Cloudflare Redirect Rule — it runs ahead of Workers and costs nothing.
"routes": [
{ "pattern": "git4data.ai", "custom_domain": true },
{ "pattern": "www.git4data.ai", "custom_domain": true }
],
// The site itself is static, served from the repo root. Files listed in
// .assetsignore stay out of the deployed bundle.
"assets": {
"directory": "./",
"binding": "ASSETS",
// Scope the Worker to the API. Every other path is served straight from
// the asset store: free, unmetered, and immune to a launch-day spike.
"run_worker_first": ["/api/*"],
// "auto-trailing-slash" serves /benchmark from benchmark.html,
// which is what the canonical tags and sitemap.xml assume.
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page"
}
}