Answers for "flask run app.py"

5

flask how to run app

$ export FLASK_APP=hello.py
$ python -m flask run
 * Running on http://127.0.0.1:5000/
Posted by: Guest on April-03-2020
0

flask app.py

# coding: utf-8
from flask import Flask, render_template
from flask.ext.gist import Gist

app = Flask(__name__, template_folder='.')
Gist(app)


@app.route('/')
def index():
    return render_template('example.html')


if __name__ == "__main__":
    app.run(host='0.0.0.0', debug=True)
Posted by: Guest on July-11-2021

Python Answers by Framework

Browse Popular Code Answers by Language