wrangler.jsonc
Rama main · réplica de lectura del repositorio original.
/**
* Cloudflare Workers config for Cloudmark (Hono + React SPA).
* https://developers.cloudflare.com/workers/wrangler/configuration/
*/
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "cloudmark",
"compatibility_date": "2025-04-01",
"compatibility_flags": ["nodejs_compat"],
"main": "./src/worker/index.ts",
"workers_dev": true,
"preview_urls": true,
"assets": {
"not_found_handling": "single-page-application",
"binding": "ASSETS",
// API must hit the Worker; without this, SPA fallback can swallow /api/*
"run_worker_first": ["/api/*"],
},
"observability": {
"enabled": true,
},
"d1_databases": [
{
"binding": "DB",
"database_name": "cloudmark",
"database_id": "8f839713-421d-45e3-8f81-7c593a0c4b2e",
"migrations_dir": "migrations",
},
],
"vars": {
"BASE_URL": "https://cloudmark.site",
},
/**
* Custom domain — DNS for cloudmark.site must point at Cloudflare.
* workers.dev URL remains available as a fallback.
*/
"routes": [
{ "pattern": "cloudmark.site", "custom_domain": true },
{ "pattern": "www.cloudmark.site", "custom_domain": true },
],
}