This is the source code for Part 1 of my Yet Another Flask Tutorial.
Create a Python3 virtual environment and install Flask in it:
$ cd yaft-one
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install flask
Before running app.py
set the APP_CONFIG
environment variable to one of config.DevelopmentConfig
, config.TestingConfig
, config.StagingConfig
, or config.ProductionConfig
.
$ export APP_CONFIG=config.DevelopmentConfig
$ python app.py