name = "yixi-app" pages_build_output_dir = "public" compatibility_date = "2026-07-01" # NOTE for anyone cloning this: `database_id` below is the author's own # database. It is not a credential — using it requires an API token for that # account — but you MUST replace it with the id `wrangler d1 create yixi` prints # for you. # # Getting this wrong fails in an unhelpful way: migrations are applied by # database *name*, so they land on your database and appear to succeed, while # the deployed Worker binds by *id* and ends up pointed at a database your token # cannot read. Every request then 500s with nothing obviously misconfigured. [[d1_databases]] binding = "DB" database_name = "yixi" database_id = "64215db6-0a05-4ae9-a583-19c8790bef06" # Smart Placement: run near the D1 database (APAC) instead of near the # visitor. Mainland-China traffic lands on a US-west colo while D1 sits in # Singapore; every render paid that hop once per query. Decided from live # traffic, may take a while to kick in — check the `cf-placement` header. [placement] mode = "smart"