Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I'm working on cs50 project1 (js & python), I download the project, and found this line in it:
engine = create_engine(os.getenv("DATABASE_URL"))
the question is how to set up the DATABASE_URL?
add this code after initialising your app:
app.config['DATABASE_URL'] = "path_to_db"
Or export it by running in your command line:
export DATABASE_URL=""postgres://user:password@server_ip:5432/table_name""
Add a comment
If you use Linux you could set variable in environment via:
$ export DATABASE_URL="postgresql://localhost/yourdatabase"
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.