Answers for "app = flask(__name__)"

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

from flask import Flask app = Flask(__name__) @app.route('/',methods = ('GET')) def home(): return ('Hello World!!1') if __name__== '_main_': app.run()

from flask import Flask 

app = Flask(__name__)

@app.route('/',methods = ('GET'))
def home():
    return ('Hello World!!1')

    if __name__== '_main_':
        app.run()
Posted by: Guest on December-29-2020

Python Answers by Framework

Browse Popular Code Answers by Language