debug mode flask code example
Example 1: flask debug
$ export FLASK_ENV=development
$ flask run
Example 2: flask how to run app
$ export FLASK_APP=hello.py
$ python -m flask run
* Running on http://127.0.0.1:5000/
Example 3: how to set debug mode on in flask
set "FLASK_DEBUG=1" in .flaskenv file of your project.
Example 4: default flask app
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Flask'