- Fork repo
- Install python 2.7.13, pip and virtualenv (google for how-to's)
- cd into project dir and create a virtual environment:
$ virtualenv env
- Activate the virtual environment
$ source env/bin/activate
on macOS and Linux,$ env\Scripts\activate
on Windows - Install python packages (virtual environment should be activated)
$ pip install -r requirements.txt
- Now run the app.py script
(env)$ python app.py
- Open http://localhost:8080 on your browser
deactivate
virtual environment when done
templates
: contains HTML filesstatic
: contains sub-folders for javascript, css and image filesuploads
: for temporary file uploads (better to use S3 for permanent storage)
app.py
: contains server side code responsible for serving HTML files and hosts the API (backend logic). Once we host this app on Heroku, the TG bot can call this API for data_config.py
: contains configuration information like app secret key, database location and other metadata required for flask to render the web appmodels.py
: contains the definition of the database model for SQLAlchemy to consumeProcfile
: Information required by heroku to deploy the app on the cloudrequirements.txt
: list of python packages required. Every time you need to install a new package with pip, runpip freeze > requirements.txt
to save the current state of required packages.gitignore
: files and file extensions which shouldn't be on github (like .pyc files and your virtualenv folder)
- Do a
git pull
everytimemaster
branch is updated to keep your local copy of the project up to date
Understand/explain directory structure, what package does what and what file does what- Explain flask app flow
- List of simple technologies to learn to wrap this app up
- Flask reference