try again
This commit is contained in:
parent
eb4daa035a
commit
e4f3c9eb5c
|
@ -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__':
|
||||
|
|
Loading…
Reference in a new issue