I am trying to follow the flask documentation on my windows machine given at the following link: http://flask.pocoo.org/docs/0.11/quickstart/#debug-mode
Firstly I wrote the code below in a python script:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run(debug=True)
I saved this in a file called run.py
Then wrote this command in the command window:
set FLASK_APP = run.py
flask run
Upon running this, I am getting the following error:
"Error: Could not locate flask application. You did not provide the FLASK_APP environment variable"
I was expecting to get this instead:
Running on http://127.0.0.1:5000/
Can somebody tell me how to fix this?
export FLASK_APP = run.py
flask run
, but am getting the following error "Could not locate flask application. You did not provide the FLASK_app evironment variable". Will you be able to guide on this?