1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine the ui, link the players to the api server static dir

This commit is contained in:
winlin 2013-12-25 23:42:23 +08:00
parent 7b2f9d59a2
commit 4b4f317e09
10 changed files with 514 additions and 15 deletions

View file

@ -474,7 +474,8 @@ if len(sys.argv) <= 1:
# parse port from user options.
port = int(sys.argv[1])
trace("api server listen at port: %s"%(port))
static_dir = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "static-dir"))
trace("api server listen at port: %s, static_dir: %s"%(port, static_dir))
# cherrypy config.
conf = {
@ -483,9 +484,12 @@ conf = {
'server.socket_host': '0.0.0.0',
'server.socket_port': port,
'tools.encode.on': True,
'tools.staticdir.on': True,
'tools.encode.encoding': "utf-8"
},
'/': {
'tools.staticdir.dir': static_dir,
'tools.staticdir.index': "index.html",
# for cherrypy RESTful api support
'request.dispatch': cherrypy.dispatch.MethodDispatcher()
}