Last active
June 7, 2021 13:16
-
-
Save avielb/6cbe5f158dc99eb5c534b231faef6b71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import flask package | |
from flask import Flask | |
# create a flask application. we will use it to run the app later | |
app = Flask(__name__) | |
# define an http path to match a python function, in this case when going to http://127.0.0.1:5000/ | |
# this function will be called. it's return will be used to response the http call | |
@app.route('/') | |
def home(): | |
return "Hey there!" | |
# main scope for python | |
if __name__ == '__main__': | |
# run the flask application itself. here we can configure it's listen port and address | |
app.run(debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment