serve covers with tornado

This commit is contained in:
j 2014-05-19 23:39:52 +02:00
commit b690aabe1b
3 changed files with 59 additions and 32 deletions

View file

@ -15,6 +15,7 @@ import websocket
import state
import node.server
import oxtornado
from item.covers import CoverHandler
def run():
root_dir = os.path.normpath(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..'))
@ -31,6 +32,7 @@ def run():
handlers = [
(r'/(favicon.ico)', StaticFileHandler, {'path': static_path}),
(r'/static/(.*)', StaticFileHandler, {'path': static_path}),
(r'/(.*)/cover(\d*).jpg', CoverHandler, dict(app=app)),
(r'/api/', oxtornado.ApiHandler, dict(app=app)),
(r'/ws', websocket.Handler),
(r".*", FallbackHandler, dict(fallback=tr)),