$ cd examples/flask/3
$ export FLASK_APP=hello.py
$ export FLASK_DEBUG=1
$ flask run

or

$ FLASK_APP=echo.py FLASK_DEBUG=1  flask run
$ FLASK_APP=echo.py FLASK_DEBUG=1  flask run --port 8080 --host 0.0.0.0
examples/flask/3/echo.py
from flask import Flask, request, render_template
app = Flask(__name__)
 
@app.route("/")
def hello():
    return render_template('echo.html')
 
@app.route("/echo", methods=['POST'])
def echo(): 
    return render_template('echo.html', text=request.form['text'])

examples/flask/3/templates/echo.html
<form action="/echo" method="POST">
<input name="text">
<input type="submit" value="Echo">
</form>
 
{% if text %}
  You said: {{ text }}
{% endif %}