🔥 How to host your python flask website free in Heroku 🔥
💥 Follow this simple steps to host your python flask application on Heroku 💥
What is Flask?
Flask is a web application framework written in Python. Flask is based on the Werkzeug WSGI toolkit and Jinja2 template engine. Both are Pocco projects. This post revolves around how to deploy a flask app on Heroku. To demonstrate this, we are first going to create a sample application for a better understanding of the process.
Prerequisites:
- Python
- pip
- Git
- VS code(editor)
STEP 1 : Let’s create a simple flask application first and then it can be deployed to heroku. Create a folder named "eagle_programming" on your computer. Open that folder in VS code editor and create a “Procfile” and write the following code.
STEP 2 : Create “requirements.txt” and write the following requirements.
STEP 3:Create app.py and write the following code.
STEP 4: Initialize an empty repo, add the files in the repo and commit all the changes.
STEP 5 : Create account in Heroku and Login to heroku CLI using "heroku login" command and Now, Create a unique name for your Web app.
STEP 6: Push your code from local to the heroku remote.
Finally, our web app will be deployed on eagleprogramming.herokuapp.com