Skip to content

Instantly share code, notes, and snippets.

@coppolaemilio
Last active October 20, 2017 11:34
Show Gist options
  • Select an option

  • Save coppolaemilio/b1b55e6385af096d93d6c98e7a8d303e to your computer and use it in GitHub Desktop.

Select an option

Save coppolaemilio/b1b55e6385af096d93d6c98e7a8d303e to your computer and use it in GitHub Desktop.
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