serve covers with tornado
This commit is contained in:
parent
040bdd1b03
commit
b690aabe1b
3 changed files with 59 additions and 32 deletions
|
|
@ -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)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue