try again
This commit is contained in:
parent
eb4daa035a
commit
e4f3c9eb5c
|
@ -21,6 +21,7 @@ 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
|
||||||
|
@ -38,18 +39,18 @@ hub:
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
print(os.environ)
|
||||||
app = Application(
|
app = Application(
|
||||||
[
|
[
|
||||||
('/services/refresh-token', RefreshHandler),
|
(os.environ['JUPYTERHUB_SERVICE_NAME'], RefreshHandler),
|
||||||
(r'.*', RefreshHandler),
|
(r'.*', RefreshHandler),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
http_server = HTTPServer(app)
|
http_server = HTTPServer(app)
|
||||||
api_host = '10.152.183.139'
|
url = urlparse(os.environ['JUPYTERHUB_SERVICE_URL'])
|
||||||
api_port = '8001'
|
|
||||||
print(os.environ)
|
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__':
|
||||||
|
|
Loading…
Reference in a new issue