You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**OPTIONAL** If you want to build the Typescript code, you need `npm` on your local env. Compiled javascript is provided as artifact in this repository, so this Typescript build step is optional. The Typescript source and configuration has been taken from https://github.com/markellekelly/jupyter-server-example.
16
18
17
19
```bash
18
-
npm install
19
-
npm run build
20
+
npm install&& \
21
+
npm run build
20
22
```
21
23
22
-
## Start Extension 1 and Extension 2
24
+
## Start Extension 1
23
25
24
26
```bash
25
-
# Start the jupyter server, it will load both simple_ext1 and simple_ext2 based on the provided trait.
26
-
jupyter server --ServerApp.jpserver_extensions="{'simple_ext1': True, 'simple_ext2': True}"
27
-
```
28
-
29
-
Optionally, you can copy `simple_ext1.json` and `simple_ext2.json` configuration to your env `etc` folder and start only Extension 1, which will also start Extension 2.
30
-
31
-
```bash
32
-
pip uninstall -y jupyter_simple_ext
33
-
python setup.py install
34
-
cp -r ./etc $(dirname $(which jupyter))/..
35
-
# Start the jupyter server extension simple_ext1, it will also load simple_ext2 because of load_other_extensions = True..
36
-
# When you invoke with the entrypoint, the default url will be opened in your browser.
37
-
jupyter simple-ext1
27
+
# Start the jupyter server activating simple_ext1 extension.
28
+
jupyter server --ServerApp.jpserver_extensions="{'simple_ext1': True}"
38
29
```
39
30
40
31
Now you can render `Extension 1` Server content in your browser.
@@ -61,6 +52,15 @@ open http://localhost:8888/simple_ext1/redirect
61
52
open http://localhost:8888/static/simple_ext1/favicon.ico
62
53
```
63
54
55
+
## Start Extension 2
56
+
57
+
The following command starts both `simple_ext1` and `simple_ext2` extensions.
58
+
59
+
```bash
60
+
# Start the jupyter server, it will load both simple_ext1 and simple_ext2 based on the provided trait.
61
+
jupyter server --ServerApp.jpserver_extensions="{'simple_ext1': True, 'simple_ext2': True}"
62
+
```
63
+
64
64
You can also render `Extension 2` Server content in your browser.
65
65
66
66
```bash
@@ -70,12 +70,29 @@ open http://localhost:8888/static/simple_ext2/test.html
70
70
open http://localhost:8888/simple_ext2/params/test?var1=foo
71
71
```
72
72
73
-
## Settings
73
+
## Start with Entrypoints
74
+
75
+
Optionally, you can copy `simple_ext1.json` and `simple_ext2.json` configuration to your env `etc` folder and start only Extension 1, which will also start Extension 2.
76
+
77
+
```bash
78
+
pip uninstall -y jupyter_simple_ext && \
79
+
python setup.py install && \
80
+
cp -r ./etc $(dirname $(which jupyter))/..
81
+
# Start the jupyter server extension simple_ext1, it will also load simple_ext2 because of load_other_extensions = True..
82
+
# When you invoke with the entrypoint, the default url will be opened in your browser.
83
+
jupyter simple-ext1
84
+
```
85
+
86
+
## Configuration
87
+
88
+
Stop any running server (with `CTRL+C`) and start with additional configuration on the command line.
74
89
75
-
Stop any running server (with CTRL+C) and start with additional settings on the command line.
90
+
The provided settings via CLI will override the configuration that reside in the files (`jupyter_simple_ext1_config.py`...)
76
91
77
92
```bash
78
-
jupyter server --ServerApp.jpserver_extensions="{'simple_ext1': True, 'simple_ext2': True}" --SimpleApp1.cli=OK
Check the log, it should return on startup something like the following base on the trait you have defined in the CLI and in the `jupyter_server_config.py`.
@@ -84,7 +101,6 @@ Check the log, it should return on startup something like the following base on
0 commit comments