From 2c7d1e422a445b296c9539b4685542a24f5cd8d0 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Thu, 14 Aug 2025 15:09:01 +0000 Subject: [PATCH 1/3] Add devcontainer --- .devcontainer/devcontainer.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..b4a02ea6 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,24 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node +{ + "name": "Node.js & TypeScript", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + + "postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension", + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "yarn install", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From 5397142a3b558a9ef106c791578372894ebf9616 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Thu, 14 Aug 2025 15:32:54 +0000 Subject: [PATCH 2/3] Add devcontainer --- .devcontainer/devcontainer.json | 30 +++++++++++++++--------------- README.md | 8 ++++++++ 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b4a02ea6..15a3e594 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,24 +1,24 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node { - "name": "Node.js & TypeScript", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", - "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + "name": "Node.js & TypeScript", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", - "postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension", - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, + "postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension", + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [3000] - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "yarn install", + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "yarn install", - // Configure tool-specific properties. - // "customizations": {}, + // Configure tool-specific properties. + // "customizations": {}, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" } diff --git a/README.md b/README.md index 6f8abe77..d82df18a 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,18 @@ npm install ## Local Development +To run locally, please use: + ```console npm start ``` +To run within a dev container we have to instruct the build-in hostcheck to bind against all addresses: + +```console +npm run start -- --host 0.0.0.0 +``` + This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. ## Build From 3ea48482391f4f8fd0a4b42a19c84edfb424fa72 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sat, 20 Sep 2025 01:34:26 +0200 Subject: [PATCH 3/3] Update README.md Co-authored-by: Bill Thornton --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d82df18a..83a95a57 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ To run locally, please use: npm start ``` -To run within a dev container we have to instruct the build-in hostcheck to bind against all addresses: +To run within a dev container we have to instruct the built-in host check to bind against all addresses: ```console npm run start -- --host 0.0.0.0