Skip to content Skip to sidebar Skip to footer

How To Set Database_url Environment Variable For Postgres Mac Terminal?

I am using postgres on Mac. I have a database up and running. I want to use it with Flask (SQL Alchemy) but the DATABASE_URL environment variable didn't create itself (I think it's

Solution 1:

Yes, you have to do that manually. So, within your terminal do this:

% cd% nano .bash_profile

It will open a file 'bash_profile' in editor in your terminal. And in there you can set environmental variables like:

export DATABASE_URL="YOUR DATABASE URL"

Check this video out for more info: https://youtu.be/5iWhQWVXosU

Post a Comment for "How To Set Database_url Environment Variable For Postgres Mac Terminal?"