A memorandum for doing Hello world in Flask.
mkdir flask-tutorial
cd flask-tutorial
python3 -m venv venv
source venv/bin/activate
pip install flask
pip freeze
app.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello world'
if __name__ == "__main__":
app.run(debug=True)
python3 app.py
Recommended Posts