Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 483 Bytes

flask.md

File metadata and controls

27 lines (21 loc) · 483 Bytes

On MS Windows:

mkdir myproject
cd myproject
python -m venv env
env\Scripts\activate
pip install Flask
type nul > hello.py
(env) C:\Users\GNE3\myproject>set FLASK_ENV=development
(env) C:\Users\GNE3\myproject>set FLASK_APP=hello.py
(env) C:\Users\GNE3\myproject>flask run

Contdnt of hello.py

from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "<p>Hello, World!</p>"

Open in brower http://127.0.0.1:5000