mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 10:04:07 +00:00
18 lines
496 B
Python
18 lines
496 B
Python
"""Example JupyterServer app subclass"""
|
|
from jupyter_server.base.handlers import JupyterHandler
|
|
from jupyter_server.serverapp import ServerApp
|
|
from tornado import web
|
|
|
|
|
|
class TreeHandler(JupyterHandler):
|
|
@web.authenticated
|
|
def get(self):
|
|
self.write("OK!")
|
|
|
|
|
|
class MockServerApp(ServerApp):
|
|
def initialize(self, argv=None):
|
|
self.default_url = "/tree"
|
|
super().initialize(argv)
|
|
self.web_app.add_handlers(".*$", [(self.base_url + "tree/?", TreeHandler)])
|