Last active
October 20, 2017 11:34
-
-
Save coppolaemilio/b1b55e6385af096d93d6c98e7a8d303e to your computer and use it in GitHub Desktop.
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 os | |
| from flask import Flask, render_template | |
| app = Flask(__name__) | |
| app.debug = True | |
| @app.route('/') | |
| def hello_world(): | |
| return 'Hello, World!' | |
| @app.route('/hello/<name>') | |
| def hello(name=None): | |
| return render_template('hello.html', name=name) | |
| if __name__ == '__main__': | |
| port = int(os.environ.get('PORT',5000)) | |
| app.run(host='0.0.0.0', port=port) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment