-
Notifications
You must be signed in to change notification settings - Fork 0
webdemo1.py
Hector Correa edited this page Jan 2, 2024
·
2 revisions
Create a virtual environment:
$ mkdir myproject
$ cd myproject
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install Flask
Create a file called webdemo1.py
with the following content:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello_world():
return "<p>Hello, World!</p>"
Run the Flask app:
FLASK_APP=webdemo1 flask run