modified announcement README and config.py

This commit is contained in:
Temidayo
2022-10-12 12:27:57 +01:00
parent fd5705b74b
commit 1050dadda4
2 changed files with 20 additions and 1 deletions

View File

@@ -6,12 +6,29 @@ that appear when JupyterHub renders pages.
To run the service as a hub-managed service simply include in your JupyterHub
configuration file something like:
:notebook:**Info**: You can run the announcement service example from the `examples`
directory, using one of the several services provided by JupyterHub.
```python
import sys
from pathlib import Path
# absolute path to announcement.py
announcement_py = str(Path(__file__).parent.joinpath("announcement.py").resolve())
#ensure get_config() is added to in
c = get_config()
...
..
c.JupyterHub.services = [
{
'name': 'announcement',
'url': 'http://127.0.0.1:8888',
'command': [sys.executable, "-m", "announcement", "--port", "8888"],
'command': [sys.executable, announcement_py, "--port", "8888"],
}
]
```

View File

@@ -1,5 +1,7 @@
import sys
c = get_config()
# To run the announcement service managed by the hub, add this.
port = 9999