Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active October 9, 2019 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/ae213370a61ac850afc756c6a596d5d9 to your computer and use it in GitHub Desktop.
Save parzibyte/ae213370a61ac850afc756c6a596d5d9 to your computer and use it in GitHub Desktop.
"""
Introducción a Flask
https://parzibyte.me/blog
"""
from flask import Flask
app = Flask(__name__)
@app.route('/')
def inicio():
return "<h1>Hola mundo con Flask</h1>"
@app.route('/suma')
def suma():
resultado = 5 + 5
return "<h1>5 + 5 = {}</h1>".format(resultado)
if __name__ == "__main__":
app.run(host='0.0.0.0', port=8000, debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment