Created
October 10, 2019 14:16
-
-
Save sonnyksimon/9db28bdd05448dae7ce879b971399f16 to your computer and use it in GitHub Desktop.
A complete Flask application.
This file contains hidden or 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 | |
| app = flask.Flask(__name__) | |
| @app.route('/', defaults={'path': ''}) | |
| @app.route('/<name>') | |
| def hello(name): | |
| if not name: | |
| name = 'World' | |
| return 'Hello ' + name + '!' | |
| if __name__ == '__main__': | |
| app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment