mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2025-01-29 17:28:29 +00:00
Merge branch 'master' of izenburn0r/deemix-pyweb into master
This commit is contained in:
commit
5b24d2547a
|
@ -47,7 +47,7 @@ if __name__ == '__main__':
|
|||
portable = path.join(path.dirname(path.realpath(__file__)), 'config')
|
||||
else:
|
||||
portable = None
|
||||
t = Thread(target=run_server, args=(port, portable))
|
||||
t = Thread(target=run_server, args=(port, url, portable))
|
||||
t.daemon = True
|
||||
t.start()
|
||||
|
||||
|
|
12
server.py
12
server.py
|
@ -270,10 +270,10 @@ def openDownloadsFolder():
|
|||
elif sys.platform == 'win32':
|
||||
subprocess.check_call(['explorer', folder])
|
||||
|
||||
def run_server(port, portable=None):
|
||||
def run_server(port, host, portable=None):
|
||||
app.initialize(portable)
|
||||
print("Starting server at http://127.0.0.1:" + str(port))
|
||||
socketio.run(server, host='0.0.0.0', port=port)
|
||||
print("Starting server at http://" + host + ":" + str(port))
|
||||
socketio.run(server, host=host, port=port)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -287,4 +287,8 @@ if __name__ == '__main__':
|
|||
portable = path.join(path.dirname(path.realpath(__file__)), 'config')
|
||||
else:
|
||||
portable = None
|
||||
run_server(port, portable)
|
||||
if '--host' in sys.argv:
|
||||
host = str(sys.argv[sys.argv.index("--host")+1])
|
||||
else:
|
||||
host = "0.0.0.0"
|
||||
run_server(port, host, portable)
|
||||
|
|
Loading…
Reference in a new issue