]> git.donarmstrong.com Git - dak.git/commitdiff
First pass at a hacky mod_wsgi version
authorMark Hymers <mhy@debian.org>
Fri, 7 Nov 2014 16:26:27 +0000 (16:26 +0000)
committerMark Hymers <mhy@debian.org>
Fri, 7 Nov 2014 16:26:27 +0000 (16:26 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
dakweb/dakweb.wsgi [new file with mode: 0644]
dakweb/dakwebserver.py

diff --git a/dakweb/dakweb.wsgi b/dakweb/dakweb.wsgi
new file mode 100644 (file)
index 0000000..1514c70
--- /dev/null
@@ -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()
+
index 9435e8ac263ed7515366317c61b9dcc0ceedc4a2..e6f71810e73f4d0f4c1ccabc7dbbc7cc16b01788 100755 (executable)
@@ -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()