PROJECTS NOTES HOME

How to run a flask app

If you have someting like this in app.py:

if __name__ == "__main__":
    with app.app_context():
        db.create_all()
    app.run(host="0.0.0.0", debug=True)

Run the app with:

python3 app.py

The app should run.

NOTe: If you try to run with flask run - changes might not automatically refresh in the browser. You might have to restart the server each time you make a change.