chmod +x heroku_env_to_dotenv.sh
./heroku_env_to_dotenv.sh
Created
August 22, 2024 17:36
-
-
Save santospatrick/fff959bbac0dd091afeb25d20bb97963 to your computer and use it in GitHub Desktop.
Get Heroku environment variables from a Project into a .env file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Replace 'your-app-name' with the name of your Heroku app | |
HEROKU_APP_NAME="your-app-name" | |
# Fetch the config variables from the Heroku app | |
heroku config -a "$HEROKU_APP_NAME" -s > .env | |
# Inform the user that the .env file has been created | |
echo ".env file created with the Heroku config variables." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment