Update ports
Update remote ports and readme
This commit is contained in:
@@ -28,13 +28,7 @@
|
||||
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
|
||||
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
|
||||
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
|
||||
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
|
||||
"remote.portsAttributes": {
|
||||
"9000": {
|
||||
"label": "My Port",
|
||||
"onAutoForward": "notify"
|
||||
}
|
||||
}
|
||||
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
|
||||
},
|
||||
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
@@ -48,6 +42,14 @@
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
"postCreateCommand": "pip3 install -r requirements.txt",
|
||||
|
||||
// Use 'portsAttributes' to set default properties for specific forwarded ports.
|
||||
"portsAttributes": {
|
||||
"9000": {
|
||||
"label": "Hello Remote World",
|
||||
"onAutoForward": "notify"
|
||||
}
|
||||
},
|
||||
|
||||
// Comment out to connect as root instead.
|
||||
"remoteUser": "vscode"
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ Some things to try:
|
||||
- Continue (<kbd>F5</kbd>). You can connect to the server in the container by either:
|
||||
- Clicking on `Open in Browser` in the notification telling you: `Your service running on port 9000 is available`.
|
||||
- Clicking the globe icon in the 'Ports' view. The 'Ports' view gives you an organized table of your forwarded ports, and you can access it with the command **Ports: Focus on Ports View**.
|
||||
- Notice port 9000 in the 'Ports' view is labeled "My Port." In `devcontainer.json`, you can set `"remote.portsAttributes"`, such as a label for your forwarded ports and the action to be taken when the port is autoforwarded.
|
||||
- Notice port 9000 in the 'Ports' view is labeled "Hello Remote World." In `devcontainer.json`, you can set `"portsAttributes"`, such as a label for your forwarded ports and the action to be taken when the port is autoforwarded.
|
||||
|
||||
> **Note:** In Remote - Containers, you can access your app at `http://localhost:9000` in a local browser. But in a browser-based Codespace, you must click the link from the notification or the `Ports` view so that the service handles port forwarding in the browser and generates the correct URL.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user