Flask - blog
Student Number: 21107895
4ca5f6cb
CHECKSUM of last commit:http://blog-21107895-cmt-120-cw-2-git-blog-21107895.apps.openshift.cs.cf.ac.uk/
URL:Initial Project Setup Required:
to create a virtual environment (first run only)
- on Windows:
python -m venv venv
- on *nix:
python3 -m venv venv
to activate the environment (every startup)
- on Windows:
venv/Scripts/activate
- on *nix:
source venv/bin/activate
Project Dependencies
- to install a particular library:
pip install <LIBRARY>
e.g.: pip install flask
- to install all dependencies recursively from
requirements.txt
file:
pip install -r requirements.txt
- to see all installed dependencies in the console:
pip freeze
- to save the project dependencies in
requirements.txt
file:
pip freeze > requirements.txt
Running the project
- to run (after
venv/Scripts/activate
and specifyingFLASK_APP=...
; as wellFLASK_ENV=development
- if desired)
flask run