From 3f25f563f874b30908bbea8005efc63c295b2458 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Fri, 7 Nov 2014 16:26:27 +0000 Subject: [PATCH] First pass at a hacky mod_wsgi version Signed-off-by: Mark Hymers --- dakweb/dakweb.wsgi | 11 +++++++++++ dakweb/dakwebserver.py | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 dakweb/dakweb.wsgi diff --git a/dakweb/dakweb.wsgi b/dakweb/dakweb.wsgi new file mode 100644 index 00000000..1514c70f --- /dev/null +++ b/dakweb/dakweb.wsgi @@ -0,0 +1,11 @@ +import sys +import os + +sys.path.append('/srv/ftp-master.debian.org/dak') + +import bottle + +import dakweb.dakwebserver + +application = bottle.default_app() + diff --git a/dakweb/dakwebserver.py b/dakweb/dakwebserver.py index 9435e8ac..e6f71810 100755 --- a/dakweb/dakwebserver.py +++ b/dakweb/dakwebserver.py @@ -37,5 +37,6 @@ from queries.source import * # Set up our initial database connection d = DBConn() -# Run the bottle -bottle.run() +# Run the bottle if we're called directly +if __name__ == '__main__': + bottle.run() -- 2.39.5