Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Thorin and Company

This project is currently hosted here.

A tutorial using Python and Flask to develop the back end of a website. At the moment it stores information in a json file.

Things covered

  • fundamentals of using Flask
  • routing using decorations
  • render from templates
  • different request methods, GET and POST
  • using flash for giving feedback to users.

requirements.txt file is a file that Python projects use to handle dependency management.

Procfile is a heroku-specific file that tells heroku that this is a web application and that we will use the command to run it.

Another error:
“No web processes running”

We're telling heroku we want to use a web process but we're not actually starting any web processes. This is basically just a watcher that will sit and watch our file that we're running continuously so that it makes any changes. We need to run the following command in the command-line in cloud 9.

heroku ps:scale web=1

Then go to heroku's settings and press on Reveal Config Vars. Here you need to create some config vars. Set the following key : values:

PORT 5000

We need to set these as we are reading them from the environment variables in
We are using this code:

if __name__ == '__main__':'IP'), # run the server

If we don't specify them here then the application won't actually be able to find them and run them which will lead to us getting errors that say that we can't run the application.

Go to More in Heroku and restart all dynos.
The dynos are just containers that our code is running in.


This is a tutorial for using Python and Flask. It will be deployed on Heroku.



No releases published


No packages published