chore: update ports

pull/1136/head
Divyansh Singh 3 years ago
parent 288dfa4e3c
commit 0227e0e787

@ -48,7 +48,7 @@ The easiest way to start testing out VitePress is to tweak the VitePress docs. Y
$ pnpm run docs $ 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`. If you don't need docs site up and running, you may start VitePress local dev environment with `pnpm run dev`.

@ -32,7 +32,7 @@ $ yarn docs:build
$ yarn docs:serve $ 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. You may configure the port of the server by passing `--port` flag as an argument.

@ -56,7 +56,7 @@ Serve the documentation site in the local server.
$ yarn docs:dev $ 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 ## 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 └─ 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. This is how VitePress works basically. The directory structure corresponds with the URL path. You add files, and just try to access it.

@ -22,7 +22,7 @@ export interface ServeOptions {
} }
export async function serve(options: 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 site = await resolveConfig(options.root, 'serve', 'production')
const base = trimChar(options?.base ?? site?.site?.base ?? '', '/') const base = trimChar(options?.base ?? site?.site?.base ?? '', '/')

Loading…
Cancel
Save