- Python 3.8
- PostgreSQL 12
- Navigate to project directory
- Create
instance
folder:mkdir -p instance
- Create
config.py
file ininstance
folder, and setSECRET_KEY
andSQLALCHEMY_DATABASE_URI
variables. For example
$ cat instance/config.py
SECRET_KEY = "<key>"
SQLALCHEMY_DATABASE_URI = "postgresql://<username>:<password>@<host>/<database>"
- Create virtual environment:
python3 -m venv venv
- Activate virtual environment:
source venv/bin/activate
- Install requirements:
pip install -r requirements.txt
- Run application in debug mode:
flask --app app run --debug
- Navigate to
http://127.0.0.1:5000/
to view application
- Navigate to project directory
- Create
instance
folder:mkdir -p instance
- Create
test_config.py
file ininstance
folder, and setSECRET_KEY
andSQLALCHEMY_DATABASE_URI
variables. - Create virtual environment:
python3 -m venv venv
- Activate virtual environment:
source venv/bin/activate
- Install requirements:
pip install -r requirements.txt
- Run tests:
python -m unittest