From f218ebf147babd03edf32231f8f3459562861f5c Mon Sep 17 00:00:00 2001 From: bamurtaugh Date: Tue, 16 Mar 2021 15:40:01 +0000 Subject: [PATCH 1/2] Update remote ports and readme --- .devcontainer/devcontainer.json | 15 ++++++++------- README.md | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e8830f1..532edee 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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,13 @@ // Use 'postCreateCommand' to run commands after the container is created. "postCreateCommand": "pip3 install -r requirements.txt", + "portsAttributes": { + "9000": { + "label": "Hello Remote World", + "onAutoForward": "notify" + } + }, + // Comment out to connect as root instead. "remoteUser": "vscode" } diff --git a/README.md b/README.md index 9502ceb..661f47b 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Some things to try: - Continue (F5). 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. From f0c028c245ede7a10a693e06c8bcc3c0bf7b7b39 Mon Sep 17 00:00:00 2001 From: bamurtaugh Date: Tue, 16 Mar 2021 15:43:47 +0000 Subject: [PATCH 2/2] Update comment --- .devcontainer/devcontainer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 532edee..4228328 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -42,6 +42,7 @@ // 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",