Skip to content

Instantly share code, notes, and snippets.

@mgood
Created March 24, 2014 22:03
Show Gist options
  • Save mgood/9750205 to your computer and use it in GitHub Desktop.
Save mgood/9750205 to your computer and use it in GitHub Desktop.
Example app for flask-failsafe PR #3
from flask import Flask
from flask_failsafe import failsafe
@failsafe
def create_app():
app = Flask(__name__)
app.config.update(
DEBUG=True,
SERVER_HOST='localhost',
SERVER_PORT=5001
)
@app.route('/')
def index():
return 'Hello'
return app
app = create_app()
app.run(
debug=app.config['DEBUG'],
host=app.config['SERVER_HOST'],
port=app.config['SERVER_PORT'],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment