mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-28 18:36:07 +00:00
Replaced 0.0.0.0 with 127.0.0.1
if you want to use 0.0.0.0 use the host argument when starting the server
This commit is contained in:
parent
9315be7461
commit
c403ee720f
|
@ -47,7 +47,7 @@ if __name__ == '__main__':
|
||||||
portable = path.join(path.dirname(path.realpath(__file__)), 'config')
|
portable = path.join(path.dirname(path.realpath(__file__)), 'config')
|
||||||
else:
|
else:
|
||||||
portable = None
|
portable = None
|
||||||
t = Thread(target=run_server, args=(port, "0.0.0.0", portable))
|
t = Thread(target=run_server, args=(port, url, portable))
|
||||||
t.daemon = True
|
t.daemon = True
|
||||||
t.start()
|
t.start()
|
||||||
|
|
||||||
|
|
10
server.py
10
server.py
|
@ -270,13 +270,9 @@ def openDownloadsFolder():
|
||||||
elif sys.platform == 'win32':
|
elif sys.platform == 'win32':
|
||||||
subprocess.check_call(['explorer', folder])
|
subprocess.check_call(['explorer', folder])
|
||||||
|
|
||||||
def run_server(port, host="0.0.0.0", portable=None):
|
def run_server(port, host="127.0.0.1", portable=None):
|
||||||
app.initialize(portable)
|
app.initialize(portable)
|
||||||
if host == "0.0.0.0":
|
print("Starting server at http://" + host + ":" + str(port))
|
||||||
displayHost = "127.0.0.1"
|
|
||||||
else:
|
|
||||||
displayHost = host
|
|
||||||
print("Starting server at http://" + displayHost + ":" + str(port))
|
|
||||||
socketio.run(server, host=host, port=port)
|
socketio.run(server, host=host, port=port)
|
||||||
|
|
||||||
|
|
||||||
|
@ -294,5 +290,5 @@ if __name__ == '__main__':
|
||||||
if '--host' in sys.argv:
|
if '--host' in sys.argv:
|
||||||
host = str(sys.argv[sys.argv.index("--host")+1])
|
host = str(sys.argv[sys.argv.index("--host")+1])
|
||||||
else:
|
else:
|
||||||
host = "0.0.0.0"
|
host = "127.0.0.1"
|
||||||
run_server(port, host, portable)
|
run_server(port, host, portable)
|
||||||
|
|
Loading…
Reference in a new issue