From 868c5b35769d245cc47fec815169414fbc8d538c Mon Sep 17 00:00:00 2001 From: bamurtaugh Date: Tue, 16 Mar 2021 16:19:56 +0000 Subject: [PATCH] Update remote ports and readme --- .devcontainer/devcontainer.json | 16 +++++++++------- README.md | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0e44e78..8eff288 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,13 +15,7 @@ // Set *default* container specific settings.json values on container create. "settings": { "terminal.integrated.shell.linux": "/bin/bash", - "php.validate.executablePath": "/usr/local/bin/php", - "remote.portsAttributes": { - "8000": { - "label": "My Port", - "onAutoForward": "notify" - } - } + "php.validate.executablePath": "/usr/local/bin/php" }, // Add the IDs of extensions you want installed when the container is created. @@ -37,6 +31,14 @@ // Use 'postCreateCommand' to run commands after the container is created. // "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html" + // Use 'portsAttributes' to set default properties for specific forwarded ports. + "portsAttributes": { + "8000": { + "label": "Hello Remote World", + "onAutoForward": "notify" + } + }, + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "vscode" } diff --git a/README.md b/README.md index 2a95b15..0568d72 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Some things to try: - From the terminal, run `php -S 0.0.0.0:8000` - Click "Open in Browser" in the notification that appears to access the web app on this new port. - You can view an organized table of your forwarded ports in the 'Ports' view, which can be accessed with the command **Ports: Focus on Ports View**. - - Notice port 8000 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 8000 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. - Look back at the terminal, and you should see the output from your site navigations. - Edit the text on line 21 in `index.php` and refresh the page to see the changes immediately take effect. 1. **Attach debugger to the server:**