diff --git a/.gitignore b/.gitignore index 96c54ca..c56bbd0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .vagrant -.pyc +*.pyc diff --git a/src/foo/config.py b/src/foo/config.py new file mode 100644 index 0000000..7174375 --- /dev/null +++ b/src/foo/config.py @@ -0,0 +1,2 @@ +DEBUG = True +TESTING = False diff --git a/src/foo/run.py b/src/foo/run.py index 3a7d241..637ca45 100644 --- a/src/foo/run.py +++ b/src/foo/run.py @@ -1,5 +1,5 @@ from flask import Flask -app = Flask(__name__) +app = Flask('foo') @app.route('/') @@ -8,9 +8,12 @@ def hello_world(): if __name__ == '__main__': + app.config.from_object('foo.config') # Default + kwargs = {} kwargs.update({ 'host': '0.0.0.0', 'port': 8080 }) + app.run(**kwargs)