diff --git a/.changeset/unlucky-sheep-build.md b/.changeset/unlucky-sheep-build.md new file mode 100644 index 000000000000..6a69876de3fd --- /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 0a57f37ce1b6..bb1707ff063b 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 165683a7db63..d587fead507d 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 2df23782f2a1..05b733527f65 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 281fd614e012..a26ff9d8c751 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 f96022532053..1b8f26503d69 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 bdceda2d3d5b..4eb1d59791d0 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 cdaa417a387a..660df3e32411 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 e0ce8771cb5f..5c71cb6f2d0d 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 07404950f496..f130c26ff3a4 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 f3cf86d80ce0..4a3e65ec855a 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 7ea52458d0f5..d8db14287d87 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 9caae267affc..db9a6287834c 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 384c9035aec3..dc113624d6c1 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 877030ef8920..1756ffd8baaf 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 f5d979d87671..b47fae4e9186 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 c082b8306c3b..39e283d83b5d 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 acca0937c376..2ace9a1dd012 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 bb7d7c28e364..21894a77c42b 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 0b1d04188f71..a3f51750adbf 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 add8d32da377..13ff67464285 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 5968f8a3df54..656776b2a049 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 73f2c7dfeda4..6e7298a6f994 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 54d9a5c6acc6..d716cded01b6 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 079fa868e38b..7931089395da 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 83205f4df33b..28e02e923304 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 839455718e31..5369073b906d 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 9178af77d7de..8e476b8cc75f 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 11bc070eff70..67d0cfc2ee8b 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 9178af77d7de..8e476b8cc75f 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 98f7ee020622..af49ebcb7e30 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 937ad23eadd8..042a7807b51f 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 9178af77d7de..8e476b8cc75f 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 3c261d31786b..20bad66154ec 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 9178af77d7de..8e476b8cc75f 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 d1caeed41385..ecdee84b10dc 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 9178af77d7de..8e476b8cc75f 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 7ca90501af54..3c8ee3aa4725 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 9178af77d7de..8e476b8cc75f 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 4f44648daa98..1a1acc1a5f39 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 9c29863db025..555d3e7de755 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 9178af77d7de..8e476b8cc75f 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 9178af77d7de..8e476b8cc75f 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 64fd871f9b34..5bb60255a7ac 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 e55496c4adb0..5db47fb9703c 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 c57f8b95a1dd..c40953187fb0 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 7626cc495656..82cf7a12dca8 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 b7b7dafe6b78..1b2eb163d604 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 745f226245df..d8d57afa81e0 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 f00c6ebae7b9..f2b44a4a073e 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 f00c6ebae7b9..f2b44a4a073e 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 f00c6ebae7b9..f2b44a4a073e 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 f00c6ebae7b9..f2b44a4a073e 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 f00c6ebae7b9..f2b44a4a073e 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 f00c6ebae7b9..f2b44a4a073e 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 f00c6ebae7b9..f2b44a4a073e 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 7dafac3b65a3..fcbb8ec5ed11 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 7989a6f57ca2..3aae5b3a28dd 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 e97544956ad1..5d3642be6fcf 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 d9600393ec7a..7fb92ae0c0ef 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',