try again

This commit is contained in:
Micke Nordin 2024-01-16 10:45:45 +01:00
parent eb4daa035a
commit e4f3c9eb5c
Signed by untrusted user: Micke
GPG key ID: F53C4CC83EDAB3BE

View file

@ -21,6 +21,7 @@ hub:
"""
import json
import os
from urllib.parse import urlparse
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
@ -38,18 +39,18 @@ hub:
def main():
print(os.environ)
app = Application(
[
('/services/refresh-token', RefreshHandler),
(os.environ['JUPYTERHUB_SERVICE_NAME'], RefreshHandler),
(r'.*', RefreshHandler),
]
)
http_server = HTTPServer(app)
api_host = '10.152.183.139'
api_port = '8001'
print(os.environ)
http_server.listen(api_port, api_host)
url = urlparse(os.environ['JUPYTERHUB_SERVICE_URL'])
http_server.listen(url.port, url.hostname)
IOLoop.current().start()
if __name__ == '__main__':