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.
18
+
**OPTIONAL** If you want to build the Typescript code, you need [npm](https://www.npmjs.com) on your local environement. Compiled javascript is provided as artifact in this repository, so this Typescript build step is optional. The Typescript source and configuration have been taken from https://github.com/markellekelly/jupyter-server-example.
18
19
19
20
```bash
20
21
npm install && \
21
22
npm run build
22
23
```
23
24
24
-
## Start Extension 1
25
+
## No Extension
26
+
27
+
Ensure Jupyter Server is starting without any extension enabled.
28
+
29
+
```bash
30
+
# Run this command from a shell.
31
+
jupyter server
32
+
```
33
+
34
+
Browse the default home page, it should show a white page in your browser with the following content: `A Jupyter Server is running.`
35
+
36
+
```bash
37
+
# Jupyter Server default Home Page.
38
+
open http://localhost:8888
39
+
```
40
+
41
+
## Extension 1
25
42
26
43
```bash
27
44
# Start the jupyter server activating simple_ext1 extension.
@@ -31,8 +48,6 @@ jupyter server --ServerApp.jpserver_extensions="{'simple_ext1': True}"
31
48
Now you can render `Extension 1` Server content in your browser.
32
49
33
50
```bash
34
-
# Jupyter Server Home Page.
35
-
open http://localhost:8888/
36
51
# Home page as defined by default_url = '/default'.
37
52
open http://localhost:8888/simple_ext1/default
38
53
# HTML static page.
@@ -52,16 +67,16 @@ open http://localhost:8888/simple_ext1/redirect
52
67
open http://localhost:8888/static/simple_ext1/favicon.ico
53
68
```
54
69
55
-
## Start Extension 2
70
+
## Extension 1 and Extension 2
56
71
57
-
The following command starts both `simple_ext1` and `simple_ext2` extensions.
72
+
The following command starts both the `simple_ext1` and `simple_ext2` extensions.
58
73
59
74
```bash
60
75
# Start the jupyter server, it will load both simple_ext1 and simple_ext2 based on the provided trait.
61
76
jupyter server --ServerApp.jpserver_extensions="{'simple_ext1': True, 'simple_ext2': True}"
62
77
```
63
78
64
-
You can also render `Extension 2` Server content in your browser.
79
+
Check that the previous `Extension 1` content is still available ant that you can also render `Extension 2` Server content in your browser.
65
80
66
81
```bash
67
82
# HTML static page.
@@ -70,7 +85,7 @@ open http://localhost:8888/static/simple_ext2/test.html
70
85
open http://localhost:8888/simple_ext2/params/test?var1=foo
71
86
```
72
87
73
-
## Start with Entrypoints
88
+
## Work with Entrypoints
74
89
75
90
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
91
@@ -90,20 +105,20 @@ Stop any running server (with `CTRL+C`) and start with additional configuration
90
105
The provided settings via CLI will override the configuration that reside in the files (`jupyter_simple_ext1_config.py`...)
jupyter simple-ext1 --SimpleApp1.configA "ConfigA from command line"
96
109
```
97
110
98
-
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`.
111
+
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_simple_ext1_config.py`.
99
112
100
113
```
101
-
[SimpleApp1] SimpleApp1.app OK
102
-
[SimpleApp1] SimpleApp1.file OK
103
-
[SimpleApp1] SimpleApp1.cli OK
114
+
[SimpleApp1] Config {'SimpleApp1': {'configA': 'ConfigA from file', 'configB': 'ConfigB from file', 'configC': 'ConfigC from file'}}
115
+
[SimpleApp1] Config {'SimpleApp1': {'configA': 'ConfigA from file', 'configB': 'ConfigB from file', 'configC': 'ConfigC from file'}}
116
+
[SimpleApp2] WARNING | Config option `configD` not recognized by `SimpleApp2`. Did you mean `config_file`?
117
+
[SimpleApp2] Config {'SimpleApp2': {'configD': 'ConfigD from file'}}
118
+
[SimpleApp1] Config {'SimpleApp1': {'configA': 'ConfigA from command line', 'configB': 'ConfigB from file', 'configC': 'ConfigC from file'}}
104
119
```
105
120
106
-
## Start only Extension 2
121
+
## Only Extension 2
107
122
108
123
Now stop agin the server and start with only `Extension 2`.
109
124
@@ -114,43 +129,18 @@ jupyter simple-ext2
114
129
115
130
Try with the above links to check that only Extension 2 is responding (Extension 1 URLs should give you an 404 error).
116
131
117
-
## Extension 11 extending Extension 1
132
+
## Extension 11 extends Extension 1
118
133
119
134
`Extension 11` extends `Extension 1` and brings a few more configs.
120
135
121
136
Run `jupyter simple-ext11 --generate-config && vi ~/.jupyter/jupyter_config.py`.
122
137
138
+
> --generate-config returns an execption `"The ExtensionApp has not ServerApp "`
139
+
123
140
The generated configuration should contains the following.
124
141
125
142
```bash
126
-
...
127
-
# Can be used to override templates from notebook.templates.
0 commit comments