From a5dd88e3ff7af166bffbb1164a2de032c5f07fe4 Mon Sep 17 00:00:00 2001 From: zharkovstas Date: Sun, 19 May 2019 10:39:17 +0500 Subject: [PATCH] Try fix errors --- app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 00b55e7..6481ed0 100644 --- a/app.py +++ b/app.py @@ -384,8 +384,11 @@ def static_media(staticFile): def index(whatever): return static_file('index.html', "build") +application = bottle.default_app() +from paste import httpserver + if os.environ.get('APP_LOCATION') == 'heroku': - run(host="0.0.0.0", port=int(os.environ.get("PORT", 5000))) + httpserver.serve(application, host='0.0.0.0', port=int(os.environ.get("PORT", 5000))) else: - run(host='localhost', port=8080, debug=True, server='paste') + httpserver.serve(application, host='localhost', port=8080, threadpool_workers=20, request_queue_size=20) -- 2.50.1