http: Add /mopidy/ static dir that is always available
This commit is contained in:
parent
96a31adf63
commit
c1e60ba378
@ -54,12 +54,19 @@ class HttpFrontend(pykka.ThreadingActor, CoreListener):
|
||||
static_dir = os.path.join(os.path.dirname(__file__), 'data')
|
||||
logger.debug('HTTP server will serve "%s" at /', static_dir)
|
||||
|
||||
mopidy_dir = os.path.join(os.path.dirname(__file__), 'data')
|
||||
|
||||
config = {
|
||||
b'/': {
|
||||
'tools.staticdir.on': True,
|
||||
'tools.staticdir.index': 'index.html',
|
||||
'tools.staticdir.dir': static_dir,
|
||||
},
|
||||
b'/mopidy': {
|
||||
'tools.staticdir.on': True,
|
||||
'tools.staticdir.index': 'mopidy.html',
|
||||
'tools.staticdir.dir': mopidy_dir,
|
||||
},
|
||||
b'/mopidy/ws': {
|
||||
'tools.websocket.on': True,
|
||||
'tools.websocket.handler_cls': ws.WebSocketHandler,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user