Using jupyter-js-widgets in non-notebook, web context
This directory is an example project that shows how to use Jupyter widgets in a web context other than the notebook.
This example requires a Jupyter notebook server to be running. The user is prompted with a dialog to provide the URL with a running notebook server.
This example also displays read-only text area containing the code
provided in the
widget_code.json, which we used to generate the widget state.
- Start with a repository checkout, and run
yarn installin the root directory.
yarn run build:examplesin the root directory.
- Change to this directory
yarn run host
- In a new terminal run
python -m notebook --no-browser --NotebookApp.allow_origin="*" --NotebookApp.disable_check_xsrf=True --NotebookApp.token=''. WARNING: This starts an insecure Jupyter notebook server. Do not do this in production.
- In a web browser, navigate to
http://localhost:8080/(or the address specified by the
yarn run hostcommand)