From 2bc4e69a4b08dbbd60b1ed711d6cfe825adb0209 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Sat, 27 Apr 2024 20:25:43 +0200 Subject: 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. --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app.py') diff --git a/app.py b/app.py index 5529326..c64c280 100644 --- a/app.py +++ b/app.py @@ -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") -- cgit v1.2.3