summaryrefslogtreecommitdiff
path: root/mediabrowser/wsgi.py
blob: 7d808520f4cc5939d91c03cf654dd538957d52ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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))