In this section, we will take a look at how we can deploy our demonstration app to Heroku. In the following steps, we will create an account on Heroku and add the modifications required to the code, which will make it eligible to host on the platform:
- First, visit https://id.heroku.com/login to get the login screen for Heroku. If you do not have a user account already, you can go through the sign-up process to create one for free:
- We will now create a Procfile file. In this step, we create a blank file called Procfile in the app directory. Once created, we add the following line to it:
web: gunicorn app:app
This file is used during the deployment of the project to Heroku. The preceding line instructs the Heroku system to use the gunicorn server and run the file called app.py.
- We then freeze the requirements of the project. Heroku looks for...