File size: 526 Bytes
412be29 72e12da 412be29 72e12da 412be29 72e12da 412be29 72e12da 295c7b2 72e12da 412be29 72e12da |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import socket
import nest_asyncio
from backend.backend import app
from waitress import serve
nest_asyncio.apply()
site_config = {
'host': '0.0.0.0',
'port': 1337,
'debug': False
}
if __name__ == "__main__":
hostname = socket.gethostname()
ip_address = socket.gethostbyname(hostname)
print(f"Running on http://127.0.0.1:{site_config['port']}")
print(f"Running on http://{ip_address}:{site_config['port']}")
serve(app, host='0.0.0.0', port=site_config['port'],threads=4) |