Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active Oct 9, 2019
Embed
What would you like to do?
"""
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