This will be a short tutorial to deploy your Flask App to Heroku. In this tutorial, I am assuming that you have already created your Flask app and have created an account in Heroku. I will publish a detailed tutorial soon.
- Navigate to the folder where you have the Flask app through terminal.
- Type the following things which are inside the “ ” in terminal.
“heroku login” — This logs you into your heroku account
“heroku create”
“git init”
“git add .”
“pip freeze > requirements.txt”
“touch Procfile” — This creates a procfile.
“open Procfile” — This will open the file and now type “web:gunicorn app:app” on the file. Save the file and close.
“ git commit -m “First Commit” ”
“git push heroku master”
3. You just finished deploying your Flask app to Heroku. In order to open it simply type “heroku open” on your terminal.
This was a short tutorial. Please let me know if you want a detailed one.