diff options
author | Linnnus <[email protected]> | 2024-04-27 20:25:43 +0200 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-04-27 20:25:43 +0200 |
commit | 2bc4e69a4b08dbbd60b1ed711d6cfe825adb0209 (patch) | |
tree | f4a2bbc438caa97f4045a0aac2d698b4c71832a8 | |
parent | ed0ed51c99da86882b5e79ec973116e0d833ee78 (diff) |
Switch to gevent as backing WSGI server
We've switched the backing server a few times:
At 45a7c91fbef2e9c2c0c6821edb06bae75077b50c Linnnus added gunicorn
because it supported SSL certificates, unlike the default server.
At 0cb2a367968ea0bc45739da5c88fd7b88ca281a7 Jannick switched to
cherrypy. I'm not sure why.
At 22d80f90b6b60b6a40a30b772716b950239b539b Jannick switched to switched
to Waitress, which worked on Windows (unlike gunicorn) but doesn't
support SSL.
Now, I'm switching to gevent which supports SSL and (apparently)
windows. Hopefully we won't have to switch again.
-rw-r--r-- | app.py | 3 | ||||
-rw-r--r-- | requirements.txt | 5 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,4 @@ +from gevent import monkey; monkey.patch_all() # MUST BE FIRST IMPORT from bottle import Bottle, run, debug, static_file, request, redirect, response, HTTPError from bottle import jinja2_template as template from oauthlib.oauth2 import WebApplicationClient @@ -69,4 +70,4 @@ def server_static(type, filename): debug(True) run(app, host='localhost', port=8080, reloader=True, - server="waitress", keyfile="./pki/server.key", certfile="./pki/server.crt") + server="gevent", keyfile="./pki/server.key", certfile="./pki/server.crt") diff --git a/requirements.txt b/requirements.txt index 06829c0..0fa0176 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,8 @@ bottle==0.12.25 bottle-sqlite==0.2.0 certifi==2024.2.2 charset-normalizer==3.3.2 -gunicorn==21.2.0 +gevent==24.2.1 +greenlet==3.0.3 idna==3.7 Jinja2==3.1.3 MarkupSafe==2.1.5 @@ -12,3 +13,5 @@ python-dotenv==1.0.1 requests==2.31.0 requests-oauthlib==2.0.0 urllib3==2.2.1 +zope.event==5.0 +zope.interface==6.3 |