Hello world example of an async web server hosted using the Jupyter server proxy mechanism.
cd hello_jupyter_server_proxy
pip install -e .
This repository provides a minimal example of a Jupyter server proxy implementation. I hope this example will be useful to help people like me set up more realistic instances of proxy servers.
Jupyter server proxies allow Jupyter servers to host other sorts of web servers. This is useful because it allows other web technologies to be deployed using the same tools that deploy Jupyter (and deploy containers, set up proxies, establish HTTPS support, and all that other stuff).
Below is an outline of the different files in the repository and their purpose.
This executable script that starts a trivial "hello world" web server on a given port. It is installed as a command line script.
$ async_hello_world_server 9876 my_base
The above starts the server using port 9876 with a "base url" value my_base
.
The port and base url are passed from the Jupyter server during initialization.
This is the Python implementation of the trivial web server.
This is the standard setup script for the module. It installs the
async_hello_world_server
script. It also specifies the
an entry point for the module called jupyter_serverproxy_servers
'helloServer = hello_jupyter_server_proxy:setup_hello_server'
When the Jupyter server starts up it scans the Python installation for these entry points and uses them to set up proxy server plugins.
This is the module initializer file which imports the setup_hello_server
function so it can be accessed as hello_jupyter_server_proxy.setup_hello_server
by the Jupyter server.
This file defines the configuration parameters for the plugin. It specifies the command format for starting the server using the command line script
'command': ['async_hello_world_server', '{port}', '{base_url}'],
and also indicates where to find the icon for the server.
This is the icon for the server used by JupyterLab. Only SVG format is supported.
This is the image I wanted to use as an icon, but it's not supported.