What is the recommended way to have a staging and a production environment?

For the record, I'm using Cloudflare D1. I know how to set up the wrangler.json file such that based on the environment I use a different database (same binding, just different database IDs). How can I make it so the drizzle.config.ts file uses a different .env file based on the environment being used?
3 Replies
salomon_.
salomon_.2d ago
Drizzle ORM - drizzle.config.ts
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
salomon_.
salomon_.2d ago
npm
dotenv
Loads environment variables from .env file. Latest version: 16.4.7, last published: 2 months ago. Start using dotenv in your project by running npm i dotenv. There are 52118 other projects in the npm registry using dotenv.
salomon_.
salomon_.2d ago
And just run drizzle.config for different environment

Did you find this page helpful?