Shopify Node App - How to deploy with production or development .env variables

Shopify Node App - How to deploy with production or development .env variables

devHam
Tourist
8 0 3

Hi,

I'm new to Shopify Node apps and also Next.js.

I've got my app running fine but I've run into an issue now that my app is sending data to my chosen DB: I need one config for my development DB and another for my production DB.

There's only one .env file in the app created with the Shopify CLI, so I'm wondering what the steps are to create, say, a .env.production and a .env.development file and specify which .env to deploy. For example, if running on my local machine just use .env.development, but if I'm deploying to Heroku, deploy with .env.production

Has anyone done this?

Thanks!

Replies 0 (0)