From 2a5bc9636647c1beeb58f3f0b3f2bcecb3509d16 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Mon, 30 Nov 2015 20:14:16 +0100 Subject: poc --- mediabrowser/wsgi.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 mediabrowser/wsgi.py (limited to 'mediabrowser/wsgi.py') 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)) -- cgit v1.2.1