
wrangler.toml, but I have no idea and can't find any info for how to make the api endpoint pick the right db on each environment (using locals.runtime.env.DB).
By the end of 2024, D1 will support automatic read replication for scalability and low-latency access around the world

locals.runtime.env.DB