diff --git a/.github/contributing.md b/.github/contributing.md index ae77e6be..b3573d8b 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -48,7 +48,7 @@ The easiest way to start testing out VitePress is to tweak the VitePress docs. Y $ pnpm run docs ``` -After executing the above command, visit http://localhost:3000 and try modifying the source code. You'll get live update. +After executing the above command, visit http://localhost:5173 and try modifying the source code. You'll get live update. If you don't need docs site up and running, you may start VitePress local dev environment with `pnpm run dev`. diff --git a/docs/guide/deploying.md b/docs/guide/deploying.md index f67faf81..efb2ae6b 100644 --- a/docs/guide/deploying.md +++ b/docs/guide/deploying.md @@ -32,7 +32,7 @@ $ yarn docs:build $ yarn docs:serve ``` -The `serve` command will boot up local static web server that serves the files from `.vitepress/dist` at `http://localhost:5000`. It's an easy way to check if the production build looks OK in your local environment. +The `serve` command will boot up local static web server that serves the files from `.vitepress/dist` at `http://localhost:4173`. It's an easy way to check if the production build looks OK in your local environment. You may configure the port of the server by passing `--port` flag as an argument. diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index b751b33c..42e91885 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -56,7 +56,7 @@ Serve the documentation site in the local server. $ yarn docs:dev ``` -VitePress will start a hot-reloading development server at `http://localhost:3000`. +VitePress will start a hot-reloading development server at `http://localhost:5173`. ## Step. 4: Add more pages @@ -70,7 +70,7 @@ Let's add another page to the site. Create a file name `getting-started.md` alon └─ package.json ``` -Then, try to access `http://localhost:3000/getting-started` and you should see the content of `getting-started` is shown. +Then, try to access `http://localhost:5173/guide/getting-started.html` and you should see the content of `getting-started` is shown. This is how VitePress works basically. The directory structure corresponds with the URL path. You add files, and just try to access it. diff --git a/src/node/serve/serve.ts b/src/node/serve/serve.ts index 6b81e306..107b0ad6 100644 --- a/src/node/serve/serve.ts +++ b/src/node/serve/serve.ts @@ -22,7 +22,7 @@ export interface ServeOptions { } export async function serve(options: ServeOptions = {}) { - const port = options.port !== undefined ? options.port : 5000 + const port = options.port !== undefined ? options.port : 4173 const site = await resolveConfig(options.root, 'serve', 'production') const base = trimChar(options?.base ?? site?.site?.base ?? '', '/')