1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Enabled dual stack web server

This commit is contained in:
krateng 2022-04-14 20:49:40 +02:00
parent 1d9247fc72
commit 7f9aa125af
2 changed files with 4 additions and 3 deletions

View File

@ -142,7 +142,7 @@ malojaconfig = Configuration(
"dev_mode":(tp.Boolean(), "Enable developer mode", False), "dev_mode":(tp.Boolean(), "Enable developer mode", False),
}, },
"Network":{ "Network":{
"host":(tp.String(), "Host", "::", "Host for your server - most likely :: for IPv6 or 0.0.0.0 for IPv4"), "host":(tp.String(), "Host", "*", "Host for your server, e.g. '*' for dual stack, '::' for IPv6 or '0.0.0.0' for IPv4"),
"port":(tp.Integer(), "Port", 42010), "port":(tp.Integer(), "Port", 42010),
}, },
"Technical":{ "Technical":{

View File

@ -332,8 +332,9 @@ def run_server():
try: try:
#run(webserver, host=HOST, port=MAIN_PORT, server='waitress') #run(webserver, host=HOST, port=MAIN_PORT, server='waitress')
log(f"Listening on {HOST}:{PORT}") listen = f"{HOST}:{PORT}"
waitress.serve(webserver, host=HOST, port=PORT, threads=THREADS) log(f"Listening on {listen}")
waitress.serve(webserver, listen=listen, threads=THREADS)
except OSError: except OSError:
log("Error. Is another Maloja process already running?") log("Error. Is another Maloja process already running?")
raise raise