summaryrefslogtreecommitdiff
path: root/mediabrowser/wsgi.py
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2015-11-30 20:14:16 +0100
committerYves Fischer <yvesf-git@xapek.org>2016-01-08 20:38:18 +0100
commit2a5bc9636647c1beeb58f3f0b3f2bcecb3509d16 (patch)
treecb1abc4fc90e9341b614114136e8be3d98c33e97 /mediabrowser/wsgi.py
downloadflask-mediabrowser-2a5bc9636647c1beeb58f3f0b3f2bcecb3509d16.tar.gz
flask-mediabrowser-2a5bc9636647c1beeb58f3f0b3f2bcecb3509d16.zip
poc
Diffstat (limited to 'mediabrowser/wsgi.py')
-rw-r--r--mediabrowser/wsgi.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/mediabrowser/wsgi.py b/mediabrowser/wsgi.py
new file mode 100644
index 0000000..7d80852
--- /dev/null
+++ b/mediabrowser/wsgi.py
@@ -0,0 +1,15 @@
+from flask import Flask
+from werkzeug.contrib.cache import SimpleCache
+
+import mediabrowser
+
+import os
+
+
+"""Run via WSGI"""
+root = os.getenv("MEDIABROWSER_ROOT")
+if not root:
+ raise Exception('Must set MEDIABROWSER_ROOT variable')
+cache = SimpleCache()
+application = Flask("mediabrowser-demo")
+application.register_blueprint(mediabrowser.build(root, cache))