Flask project 1

Flask is the web server running with python, and Gunicorn is what will basically run our web server on Heroku when we will deploy our app.

Lets first set up a basic app and create a file app.py in your folder.

As you see we will render an index.html so create that file too inside a templates folder and paste this code inside .

Lets run our app locally with flask run . As you can see we are greeted like expected, with all the ‘!!!!’, but I had to export the variable in my terminal. Every time you close your terminal you need to do that again. Not very efficient.

 

Leave a Reply