Environments
Environments are different contexts that your code runs in. Cloudflare Developer Platform allows you to create and manage different environments. Through environments, you can deploy the same project to multiple places under multiple names.
To specify different D1 databases for different environments, use the following syntax in your wrangler.toml
file:
In the code above, the staging
environment is using a different database (DATABASE_NAME_1
) than the production
environment (DATABASE_NAME_2
).