Flask in Windows


I’m using Python 2.7.17 on Windows 8, virtualenv already installed (pip install virtualenv), here’s my simple step to create hello world style app

$ set FLASK_APP=app.py
$ set FLASK_ENV=development
$ virtualenv venv
$ cd venv/Scripts
$ activate
$ pip install flask
$ cd ..
$ touch app.py
$ subl app.py
-------------------------------
from flask import Flask

app = Flask(__name__)

@app.route('/')
def welcome():
return '<p>welcome to the jungle</p>'

if __name__ == '__main__':
app.run(debug=True)
-------------------------------
$ python app.py

or

$ flask run
Then, point browser to http://localhost:5000