Last active
January 28, 2019 08:03
-
-
Save robvanderleek/a0a51d63e33fe729e2fa079f8b9b42bd to your computer and use it in GitHub Desktop.
Simple Flask app
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 os | |
from flask import Flask | |
from buzz import generator | |
app = Flask(__name__) | |
@app.route("/") | |
def generate_buzz(): | |
page = '<html><body><h1>' | |
page += generator.generate_buzz() | |
page += '</h1></body></html>' | |
return page | |
if __name__ == "__main__": | |
app.run(host='0.0.0.0', port=int(os.getenv('PORT', 5000))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment