I am starting to learn Flask.
I wrote this super basic application. It runs but does not do a thing:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def Index():
return "<h1>Hello!</h1>"
if __name__ == "__name__":
app.run(debug=True)
The console shows:
C:\Users\TalT\PycharmProjects\FlaskBeginners\venv\Scripts\python.exe C:/Users/TalT/PycharmProjects/FlaskBeginners/MyFirstWebPage.py
Process finished with exit code 0
I work on Win10, PyCharm 2019.3.3 and Python 3.7 . I don't understand where is the problem? Is it a python issue or maybe project configuration? Can you advise please?
Thanks!
if __name__ == "__name__":should beif __name__ == "__main__":- Cory Nezin