simple.py
from flask import Flask
application = Flask("simple")
@application.route("/")
def index():
return "Hello World"
To run this Flask application, run the following:
- export FLASK_APP=simple.py
- flask run
- flask run --host 0.0.0.0
Now, navigate "http://localhost:5000" to see the word "Hello World" displayed on the browser.
No comments:
Post a Comment