flask run bind code example
Example 1: export flask app
> set FLASK_APP=hello
> flask run
Example 2: default flask app
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Flask'
> set FLASK_APP=hello
> flask run
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Flask'