From a4ef784946330abc6aed8e03accdf7541881df0f Mon Sep 17 00:00:00 2001 From: mjfernez Date: Mon, 7 Jun 2021 19:47:59 -0400 Subject: wsgi compatibility Moves the setup() function outside of main so the app is setup before a wrapper runs it. Also fixes deployment tutorial in the README --- server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server.py') diff --git a/server.py b/server.py index 8614fe3..21ecb2f 100644 --- a/server.py +++ b/server.py @@ -192,7 +192,7 @@ def setup(): app.config.update({'DOMAIN': siteconfig.DOMAIN}) app.config.update({'HOME_TITLE': siteconfig.HOME_TITLE}) - +# Need to come first to be compatible with wsgi +setup() if __name__ == '__main__': - setup() - app.run(host=siteconfig.HOST, port=siteconfig.PORT) + app.run() -- cgit v1.2.3