This commit is contained in:
Micke Nordin 2024-01-16 10:25:14 +01:00
parent f42114dff2
commit db6870a955
Signed by untrusted user: Micke
GPG key ID: F53C4CC83EDAB3BE

View file

@ -21,7 +21,6 @@ hub:
""" """
import json import json
import os import os
from urllib.parse import urlparse
from tornado.httpserver import HTTPServer from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop from tornado.ioloop import IOLoop
@ -47,9 +46,9 @@ hub:
) )
http_server = HTTPServer(app) http_server = HTTPServer(app)
url = urlparse(f'http://{os.environ["PROXY_API_SERVICE_HOST"]}:{os.environ["PROXY_API_SERVICE_PORT"]}') api_host = os.environ['PROXY_API_SERVICE_HOST']
api_port = os.environ['PROXY_API_SERVICE_PORT']
http_server.listen(url.port, url.hostname) http_server.listen(api_port, api_host)
IOLoop.current().start() IOLoop.current().start()
if __name__ == '__main__': if __name__ == '__main__':