Created
March 24, 2014 22:03
-
-
Save mgood/9750205 to your computer and use it in GitHub Desktop.
Example app for flask-failsafe PR #3
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
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