Building a Python Flask application — Tutorial 02

from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
from flask import Flask
app = Flask(__name__)
@app.route(‘/’)
def hello_world():
return 'Hello, World!'
  • if you have not enabled development features, you should restart the server manually.
  • If you have enabled the development features (including debugging) the server will be refreshed (restart) automatically without our concern.
$ export FLASK_ENV=development
$ flask run

--

--

Senior Software Engineer at Spades | LinkedIn: https://www.linkedin.com/in/sashini-hettiarachchi/

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store