diff --git a/.changeset/unlucky-sheep-build.md b/.changeset/unlucky-sheep-build.md new file mode 100644 index 0000000000..6a69876de3 --- /dev/null +++ b/.changeset/unlucky-sheep-build.md @@ -0,0 +1,7 @@ +--- +'astro': major +--- + +Astro's default port when running the dev or preview server is now `4321`. + +This will reduce conflicts with ports used by other tools. diff --git a/.devcontainer/basics/devcontainer.json b/.devcontainer/basics/devcontainer.json index 0a57f37ce1..bb1707ff06 100644 --- a/.devcontainer/basics/devcontainer.json +++ b/.devcontainer/basics/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/basics", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/blog/devcontainer.json b/.devcontainer/blog/devcontainer.json index 165683a7db..d587fead50 100644 --- a/.devcontainer/blog/devcontainer.json +++ b/.devcontainer/blog/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/blog", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/deno/devcontainer.json b/.devcontainer/deno/devcontainer.json index 2df23782f2..05b733527f 100644 --- a/.devcontainer/deno/devcontainer.json +++ b/.devcontainer/deno/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/deno", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/docs/devcontainer.json b/.devcontainer/docs/devcontainer.json index 281fd614e0..a26ff9d8c7 100644 --- a/.devcontainer/docs/devcontainer.json +++ b/.devcontainer/docs/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/docs", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/framework-alpine/devcontainer.json b/.devcontainer/framework-alpine/devcontainer.json index f960225320..1b8f26503d 100644 --- a/.devcontainer/framework-alpine/devcontainer.json +++ b/.devcontainer/framework-alpine/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/framework-alpine", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/framework-lit/devcontainer.json b/.devcontainer/framework-lit/devcontainer.json index bdceda2d3d..4eb1d59791 100644 --- a/.devcontainer/framework-lit/devcontainer.json +++ b/.devcontainer/framework-lit/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/framework-lit", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/framework-multiple/devcontainer.json b/.devcontainer/framework-multiple/devcontainer.json index cdaa417a38..660df3e324 100644 --- a/.devcontainer/framework-multiple/devcontainer.json +++ b/.devcontainer/framework-multiple/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/framework-multiple", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/framework-preact/devcontainer.json b/.devcontainer/framework-preact/devcontainer.json index e0ce8771cb..5c71cb6f2d 100644 --- a/.devcontainer/framework-preact/devcontainer.json +++ b/.devcontainer/framework-preact/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/framework-preact", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/framework-react/devcontainer.json b/.devcontainer/framework-react/devcontainer.json index 07404950f4..f130c26ff3 100644 --- a/.devcontainer/framework-react/devcontainer.json +++ b/.devcontainer/framework-react/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/framework-react", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/framework-solid/devcontainer.json b/.devcontainer/framework-solid/devcontainer.json index f3cf86d80c..4a3e65ec85 100644 --- a/.devcontainer/framework-solid/devcontainer.json +++ b/.devcontainer/framework-solid/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/framework-solid", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/framework-svelte/devcontainer.json b/.devcontainer/framework-svelte/devcontainer.json index 7ea52458d0..d8db14287d 100644 --- a/.devcontainer/framework-svelte/devcontainer.json +++ b/.devcontainer/framework-svelte/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/framework-svelte", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/framework-vue/devcontainer.json b/.devcontainer/framework-vue/devcontainer.json index 9caae267af..db9a628783 100644 --- a/.devcontainer/framework-vue/devcontainer.json +++ b/.devcontainer/framework-vue/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/framework-vue", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/hackernews/devcontainer.json b/.devcontainer/hackernews/devcontainer.json index 384c9035ae..dc113624d6 100644 --- a/.devcontainer/hackernews/devcontainer.json +++ b/.devcontainer/hackernews/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/hackernews", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/minimal/devcontainer.json b/.devcontainer/minimal/devcontainer.json index 877030ef89..1756ffd8ba 100644 --- a/.devcontainer/minimal/devcontainer.json +++ b/.devcontainer/minimal/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/minimal", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/non-html-pages/devcontainer.json b/.devcontainer/non-html-pages/devcontainer.json index f5d979d876..b47fae4e91 100644 --- a/.devcontainer/non-html-pages/devcontainer.json +++ b/.devcontainer/non-html-pages/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/non-html-pages", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/portfolio/devcontainer.json b/.devcontainer/portfolio/devcontainer.json index c082b8306c..39e283d83b 100644 --- a/.devcontainer/portfolio/devcontainer.json +++ b/.devcontainer/portfolio/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/portfolio", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/ssr/devcontainer.json b/.devcontainer/ssr/devcontainer.json index acca0937c3..2ace9a1dd0 100644 --- a/.devcontainer/ssr/devcontainer.json +++ b/.devcontainer/ssr/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/ssr", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/with-markdown-plugins/devcontainer.json b/.devcontainer/with-markdown-plugins/devcontainer.json index bb7d7c28e3..21894a77c4 100644 --- a/.devcontainer/with-markdown-plugins/devcontainer.json +++ b/.devcontainer/with-markdown-plugins/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/with-markdown-plugins", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/with-markdown-shiki/devcontainer.json b/.devcontainer/with-markdown-shiki/devcontainer.json index 0b1d04188f..a3f51750ad 100644 --- a/.devcontainer/with-markdown-shiki/devcontainer.json +++ b/.devcontainer/with-markdown-shiki/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/with-markdown-shiki", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/with-mdx/devcontainer.json b/.devcontainer/with-mdx/devcontainer.json index add8d32da3..13ff674642 100644 --- a/.devcontainer/with-mdx/devcontainer.json +++ b/.devcontainer/with-mdx/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/with-mdx", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/with-nanostores/devcontainer.json b/.devcontainer/with-nanostores/devcontainer.json index 5968f8a3df..656776b2a0 100644 --- a/.devcontainer/with-nanostores/devcontainer.json +++ b/.devcontainer/with-nanostores/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/with-nanostores", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/with-tailwindcss/devcontainer.json b/.devcontainer/with-tailwindcss/devcontainer.json index 73f2c7dfed..6e7298a6f9 100644 --- a/.devcontainer/with-tailwindcss/devcontainer.json +++ b/.devcontainer/with-tailwindcss/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/with-tailwindcss", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/with-vite-plugin-pwa/devcontainer.json b/.devcontainer/with-vite-plugin-pwa/devcontainer.json index 54d9a5c6ac..d716cded01 100644 --- a/.devcontainer/with-vite-plugin-pwa/devcontainer.json +++ b/.devcontainer/with-vite-plugin-pwa/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/with-vite-plugin-pwa", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.devcontainer/with-vitest/devcontainer.json b/.devcontainer/with-vitest/devcontainer.json index 079fa868e3..7931089395 100644 --- a/.devcontainer/with-vitest/devcontainer.json +++ b/.devcontainer/with-vitest/devcontainer.json @@ -7,13 +7,13 @@ "workspaceFolder": "/workspaces/astro/examples/with-vitest", "portsAttributes": { - "3000": { + "4321": { "label": "Application", "onAutoForward": "openPreview" } }, - "forwardPorts": [3000], + "forwardPorts": [4321], "postCreateCommand": "pnpm install && cd /workspaces/astro && pnpm run build", diff --git a/.gitpod.yml b/.gitpod.yml index 83205f4df3..28e02e9233 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -18,7 +18,7 @@ vscode: - esbenp.prettier-vscode - dbaeumer.vscode-eslint ports: - - port: 3000 + - port: 4321 onOpen: open-preview github: prebuilds: diff --git a/examples/basics/README.md b/examples/basics/README.md index 839455718e..5369073b90 100644 --- a/examples/basics/README.md +++ b/examples/basics/README.md @@ -43,7 +43,7 @@ All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | diff --git a/examples/basics/sandbox.config.json b/examples/basics/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/basics/sandbox.config.json +++ b/examples/basics/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/blog/README.md b/examples/blog/README.md index 11bc070eff..67d0cfc2ee 100644 --- a/examples/blog/README.md +++ b/examples/blog/README.md @@ -53,7 +53,7 @@ All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | diff --git a/examples/blog/sandbox.config.json b/examples/blog/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/blog/sandbox.config.json +++ b/examples/blog/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/deno/README.md b/examples/deno/README.md index 98f7ee0206..af49ebcb7e 100644 --- a/examples/deno/README.md +++ b/examples/deno/README.md @@ -42,7 +42,7 @@ All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | | (preview uses Deno CLI) | diff --git a/examples/deno/sandbox.config.json b/examples/deno/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/deno/sandbox.config.json +++ b/examples/deno/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/framework-alpine/sandbox.config.json b/examples/framework-alpine/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/framework-alpine/sandbox.config.json +++ b/examples/framework-alpine/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/framework-lit/sandbox.config.json b/examples/framework-lit/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/framework-lit/sandbox.config.json +++ b/examples/framework-lit/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/framework-multiple/sandbox.config.json b/examples/framework-multiple/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/framework-multiple/sandbox.config.json +++ b/examples/framework-multiple/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/framework-preact/sandbox.config.json b/examples/framework-preact/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/framework-preact/sandbox.config.json +++ b/examples/framework-preact/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/framework-react/sandbox.config.json b/examples/framework-react/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/framework-react/sandbox.config.json +++ b/examples/framework-react/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/framework-solid/sandbox.config.json b/examples/framework-solid/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/framework-solid/sandbox.config.json +++ b/examples/framework-solid/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/framework-svelte/sandbox.config.json b/examples/framework-svelte/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/framework-svelte/sandbox.config.json +++ b/examples/framework-svelte/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/framework-vue/sandbox.config.json b/examples/framework-vue/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/framework-vue/sandbox.config.json +++ b/examples/framework-vue/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/hackernews/README.md b/examples/hackernews/README.md index 937ad23ead..042a7807b5 100644 --- a/examples/hackernews/README.md +++ b/examples/hackernews/README.md @@ -48,7 +48,7 @@ All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | diff --git a/examples/hackernews/sandbox.config.json b/examples/hackernews/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/hackernews/sandbox.config.json +++ b/examples/hackernews/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/minimal/README.md b/examples/minimal/README.md index 3c261d3178..20bad66154 100644 --- a/examples/minimal/README.md +++ b/examples/minimal/README.md @@ -36,7 +36,7 @@ All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | diff --git a/examples/minimal/sandbox.config.json b/examples/minimal/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/minimal/sandbox.config.json +++ b/examples/minimal/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/non-html-pages/README.md b/examples/non-html-pages/README.md index d1caeed413..ecdee84b10 100644 --- a/examples/non-html-pages/README.md +++ b/examples/non-html-pages/README.md @@ -41,7 +41,7 @@ All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | diff --git a/examples/non-html-pages/sandbox.config.json b/examples/non-html-pages/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/non-html-pages/sandbox.config.json +++ b/examples/non-html-pages/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/portfolio/README.md b/examples/portfolio/README.md index 7ca90501af..3c8ee3aa47 100644 --- a/examples/portfolio/README.md +++ b/examples/portfolio/README.md @@ -19,7 +19,7 @@ All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | diff --git a/examples/portfolio/sandbox.config.json b/examples/portfolio/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/portfolio/sandbox.config.json +++ b/examples/portfolio/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/with-markdoc/README.md b/examples/with-markdoc/README.md index 4f44648daa..1a1acc1a5f 100644 --- a/examples/with-markdoc/README.md +++ b/examples/with-markdoc/README.md @@ -45,7 +45,7 @@ All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | diff --git a/examples/with-markdoc/sandbox.config.json b/examples/with-markdoc/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/with-markdoc/sandbox.config.json +++ b/examples/with-markdoc/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/with-markdown-plugins/sandbox.config.json b/examples/with-markdown-plugins/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/with-markdown-plugins/sandbox.config.json +++ b/examples/with-markdown-plugins/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/with-markdown-shiki/sandbox.config.json b/examples/with-markdown-shiki/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/with-markdown-shiki/sandbox.config.json +++ b/examples/with-markdown-shiki/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/with-mdx/sandbox.config.json b/examples/with-mdx/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/with-mdx/sandbox.config.json +++ b/examples/with-mdx/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/with-nanostores/sandbox.config.json b/examples/with-nanostores/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/with-nanostores/sandbox.config.json +++ b/examples/with-nanostores/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/with-tailwindcss/sandbox.config.json b/examples/with-tailwindcss/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/with-tailwindcss/sandbox.config.json +++ b/examples/with-tailwindcss/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/with-vite-plugin-pwa/README.md b/examples/with-vite-plugin-pwa/README.md index 9c29863db0..555d3e7de7 100644 --- a/examples/with-vite-plugin-pwa/README.md +++ b/examples/with-vite-plugin-pwa/README.md @@ -36,7 +36,7 @@ All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | diff --git a/examples/with-vite-plugin-pwa/sandbox.config.json b/examples/with-vite-plugin-pwa/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/with-vite-plugin-pwa/sandbox.config.json +++ b/examples/with-vite-plugin-pwa/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/examples/with-vitest/sandbox.config.json b/examples/with-vitest/sandbox.config.json index 9178af77d7..8e476b8cc7 100644 --- a/examples/with-vitest/sandbox.config.json +++ b/examples/with-vitest/sandbox.config.json @@ -4,7 +4,7 @@ "view": "browser", "template": "node", "container": { - "port": 3000, + "port": 4321, "startScript": "start", "node": "14" } diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index dc710ec2f4..1e5863d123 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -327,7 +327,7 @@ type ServerConfig = { /** * @name server.port * @type {number} - * @default `3000` + * @default `4321` * @description * Set which port the dev server should listen on. * @@ -915,7 +915,7 @@ export interface AstroUserConfig { * ```js * { * // Example: Use the function syntax to customize based on command - * server: ({ command }) => ({ port: command === 'dev' ? 3000 : 4000 }) + * server: ({ command }) => ({ port: command === 'dev' ? 4321 : 4000 }) * } * ``` */ @@ -937,7 +937,7 @@ export interface AstroUserConfig { * @docs * @name server.port * @type {number} - * @default `3000` + * @default `4321` * @description * Set which port the server should listen on. * diff --git a/packages/astro/src/cli/dev/index.ts b/packages/astro/src/cli/dev/index.ts index e55496c4ad..5db47fb970 100644 --- a/packages/astro/src/cli/dev/index.ts +++ b/packages/astro/src/cli/dev/index.ts @@ -15,7 +15,7 @@ export async function dev({ flags }: DevOptions) { usage: '[...flags]', tables: { Flags: [ - ['--port', `Specify which port to run on. Defaults to 3000.`], + ['--port', `Specify which port to run on. Defaults to 4321.`], ['--host', `Listen on all addresses, including LAN and public addresses.`], ['--host ', `Expose on a network IP address at `], ['--open', 'Automatically open the app in the browser on server start'], diff --git a/packages/astro/src/core/config/schema.ts b/packages/astro/src/core/config/schema.ts index c57f8b95a1..c40953187f 100644 --- a/packages/astro/src/core/config/schema.ts +++ b/packages/astro/src/core/config/schema.ts @@ -32,7 +32,7 @@ const ASTRO_CONFIG_DEFAULTS = { compressHTML: false, server: { host: false, - port: 3000, + port: 4321, open: false, }, integrations: [], diff --git a/packages/astro/test/cli.test.js b/packages/astro/test/cli.test.js index 7626cc4956..82cf7a12dc 100644 --- a/packages/astro/test/cli.test.js +++ b/packages/astro/test/cli.test.js @@ -131,8 +131,8 @@ describe('astro cli', () => { // Note: our tests run in parallel so this could be 3000+! expect(Number.parseInt(localURL.port)).to.be.greaterThanOrEqual( - 3000, - `Expected Port to be >= 3000` + 4321, + `Expected Port to be >= 4321` ); expect(networkURL.port).to.be.equal( localURL.port, diff --git a/packages/astro/test/fixtures/astro-basic/astro.config.mjs b/packages/astro/test/fixtures/astro-basic/astro.config.mjs index b7b7dafe6b..1b2eb163d6 100644 --- a/packages/astro/test/fixtures/astro-basic/astro.config.mjs +++ b/packages/astro/test/fixtures/astro-basic/astro.config.mjs @@ -5,5 +5,5 @@ import preact from '@astrojs/preact'; export default defineConfig({ integrations: [preact()], // make sure CLI flags have precedence - server: () => ({ port: 3000 }) + server: () => ({ port: 4321 }) }); diff --git a/packages/astro/test/fixtures/ssr-preview/preview.mjs b/packages/astro/test/fixtures/ssr-preview/preview.mjs index 745f226245..d8d57afa81 100644 --- a/packages/astro/test/fixtures/ssr-preview/preview.mjs +++ b/packages/astro/test/fixtures/ssr-preview/preview.mjs @@ -1,7 +1,7 @@ export default () => { // noop return { - port: 3000, + port: 4321, closed() {}, stop() {} } diff --git a/packages/integrations/image/test/fixtures/background-color-image/astro.config.mjs b/packages/integrations/image/test/fixtures/background-color-image/astro.config.mjs index f00c6ebae7..f2b44a4a07 100644 --- a/packages/integrations/image/test/fixtures/background-color-image/astro.config.mjs +++ b/packages/integrations/image/test/fixtures/background-color-image/astro.config.mjs @@ -3,6 +3,6 @@ import image from '@astrojs/image'; // https://astro.build/config export default defineConfig({ - site: 'http://localhost:3000', + site: 'http://localhost:4321', integrations: [image({ logLevel: 'silent', serviceEntryPoint: '@astrojs/image/sharp' })] }); diff --git a/packages/integrations/image/test/fixtures/basic-image/astro.config.mjs b/packages/integrations/image/test/fixtures/basic-image/astro.config.mjs index f00c6ebae7..f2b44a4a07 100644 --- a/packages/integrations/image/test/fixtures/basic-image/astro.config.mjs +++ b/packages/integrations/image/test/fixtures/basic-image/astro.config.mjs @@ -3,6 +3,6 @@ import image from '@astrojs/image'; // https://astro.build/config export default defineConfig({ - site: 'http://localhost:3000', + site: 'http://localhost:4321', integrations: [image({ logLevel: 'silent', serviceEntryPoint: '@astrojs/image/sharp' })] }); diff --git a/packages/integrations/image/test/fixtures/basic-picture/astro.config.mjs b/packages/integrations/image/test/fixtures/basic-picture/astro.config.mjs index f00c6ebae7..f2b44a4a07 100644 --- a/packages/integrations/image/test/fixtures/basic-picture/astro.config.mjs +++ b/packages/integrations/image/test/fixtures/basic-picture/astro.config.mjs @@ -3,6 +3,6 @@ import image from '@astrojs/image'; // https://astro.build/config export default defineConfig({ - site: 'http://localhost:3000', + site: 'http://localhost:4321', integrations: [image({ logLevel: 'silent', serviceEntryPoint: '@astrojs/image/sharp' })] }); diff --git a/packages/integrations/image/test/fixtures/get-image-remote/astro.config.mjs b/packages/integrations/image/test/fixtures/get-image-remote/astro.config.mjs index f00c6ebae7..f2b44a4a07 100644 --- a/packages/integrations/image/test/fixtures/get-image-remote/astro.config.mjs +++ b/packages/integrations/image/test/fixtures/get-image-remote/astro.config.mjs @@ -3,6 +3,6 @@ import image from '@astrojs/image'; // https://astro.build/config export default defineConfig({ - site: 'http://localhost:3000', + site: 'http://localhost:4321', integrations: [image({ logLevel: 'silent', serviceEntryPoint: '@astrojs/image/sharp' })] }); diff --git a/packages/integrations/image/test/fixtures/no-alt-text-image/astro.config.mjs b/packages/integrations/image/test/fixtures/no-alt-text-image/astro.config.mjs index f00c6ebae7..f2b44a4a07 100644 --- a/packages/integrations/image/test/fixtures/no-alt-text-image/astro.config.mjs +++ b/packages/integrations/image/test/fixtures/no-alt-text-image/astro.config.mjs @@ -3,6 +3,6 @@ import image from '@astrojs/image'; // https://astro.build/config export default defineConfig({ - site: 'http://localhost:3000', + site: 'http://localhost:4321', integrations: [image({ logLevel: 'silent', serviceEntryPoint: '@astrojs/image/sharp' })] }); diff --git a/packages/integrations/image/test/fixtures/no-alt-text-picture/astro.config.mjs b/packages/integrations/image/test/fixtures/no-alt-text-picture/astro.config.mjs index f00c6ebae7..f2b44a4a07 100644 --- a/packages/integrations/image/test/fixtures/no-alt-text-picture/astro.config.mjs +++ b/packages/integrations/image/test/fixtures/no-alt-text-picture/astro.config.mjs @@ -3,6 +3,6 @@ import image from '@astrojs/image'; // https://astro.build/config export default defineConfig({ - site: 'http://localhost:3000', + site: 'http://localhost:4321', integrations: [image({ logLevel: 'silent', serviceEntryPoint: '@astrojs/image/sharp' })] }); diff --git a/packages/integrations/image/test/fixtures/rotation/astro.config.mjs b/packages/integrations/image/test/fixtures/rotation/astro.config.mjs index f00c6ebae7..f2b44a4a07 100644 --- a/packages/integrations/image/test/fixtures/rotation/astro.config.mjs +++ b/packages/integrations/image/test/fixtures/rotation/astro.config.mjs @@ -3,6 +3,6 @@ import image from '@astrojs/image'; // https://astro.build/config export default defineConfig({ - site: 'http://localhost:3000', + site: 'http://localhost:4321', integrations: [image({ logLevel: 'silent', serviceEntryPoint: '@astrojs/image/sharp' })] }); diff --git a/packages/integrations/image/test/fixtures/squoosh-service/astro.config.mjs b/packages/integrations/image/test/fixtures/squoosh-service/astro.config.mjs index 7dafac3b65..fcbb8ec5ed 100644 --- a/packages/integrations/image/test/fixtures/squoosh-service/astro.config.mjs +++ b/packages/integrations/image/test/fixtures/squoosh-service/astro.config.mjs @@ -3,6 +3,6 @@ import image from '@astrojs/image'; // https://astro.build/config export default defineConfig({ - site: 'http://localhost:3000', + site: 'http://localhost:4321', integrations: [image({ logLevel: 'silent' })] }); diff --git a/packages/integrations/image/test/fixtures/with-mdx/astro.config.mjs b/packages/integrations/image/test/fixtures/with-mdx/astro.config.mjs index 7989a6f57c..3aae5b3a28 100644 --- a/packages/integrations/image/test/fixtures/with-mdx/astro.config.mjs +++ b/packages/integrations/image/test/fixtures/with-mdx/astro.config.mjs @@ -4,6 +4,6 @@ import mdx from '@astrojs/mdx'; // https://astro.build/config export default defineConfig({ - site: 'http://localhost:3000', + site: 'http://localhost:4321', integrations: [image({ logLevel: 'silent', serviceEntryPoint: '@astrojs/image/sharp' }), mdx()] }); diff --git a/packages/integrations/node/README.md b/packages/integrations/node/README.md index e97544956a..5d3642be6f 100644 --- a/packages/integrations/node/README.md +++ b/packages/integrations/node/README.md @@ -159,7 +159,7 @@ For standalone mode the server handles file servering in addition to the page an You can override the host and port the standalone server runs on by passing them as environment variables at runtime: ```shell -HOST=0.0.0.0 PORT=3000 node ./dist/server/entry.mjs +HOST=0.0.0.0 PORT=4321 node ./dist/server/entry.mjs ``` #### HTTPS diff --git a/packages/integrations/prefetch/playwright.config.js b/packages/integrations/prefetch/playwright.config.js index d9600393ec..7fb92ae0c0 100644 --- a/packages/integrations/prefetch/playwright.config.js +++ b/packages/integrations/prefetch/playwright.config.js @@ -25,7 +25,7 @@ const config = { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ actionTimeout: 0, /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: process.env.PLAYWRIGHT_TEST_BASE_URL || 'http://localhost:3000', + baseURL: process.env.PLAYWRIGHT_TEST_BASE_URL || 'http://localhost:4321', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry',