Skip to content

Commit cd8968b

Browse files
author
Dan Kelley
committed
had to modify to work with uWSGI and return app
1 parent 182109c commit cd8968b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/server/app.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22

33
from flask import Flask
44

5-
app = Flask(__name__)
6-
7-
85
def create_app():
6+
app = Flask(__name__)
97
app.secret_key = '1u9L#*&I3Ntc'
108
app.config['MAX_CONTENT_LENGTH'] = 500 * 1024 * 1024 # 500 Megs
119
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0
1210
from api.admin_api import admin_api
1311
from api.common_api import common_api
1412
app.register_blueprint(admin_api)
1513
app.register_blueprint(common_api)
16-
14+
return app
1715

1816
if __name__ == "__main__":
1917
FLASK_PORT = os.getenv('FLASK_PORT', None)
2018

21-
create_app()
19+
app = create_app()
2220
app.run(host='0.0.0.0', debug=True, port=FLASK_PORT)

0 commit comments

Comments
 (0)