docs: Update server options configuration reference (#3295)
Based on https://github.com/withastro/docs/pull/422/ Co-Authored-By: Rafid Muhymin Wafi <63650415+RafidMuhymin@users.noreply.github.com> Co-authored-by: Rafid Muhymin Wafi <63650415+RafidMuhymin@users.noreply.github.com>
This commit is contained in:
parent
2864d09ad4
commit
ee55d492b5
1 changed files with 12 additions and 6 deletions
|
@ -432,7 +432,7 @@ export interface AstroUserConfig {
|
||||||
* @name Server Options
|
* @name Server Options
|
||||||
* @description
|
* @description
|
||||||
*
|
*
|
||||||
* Customize the Astro dev server, used by both `astro dev` and `astro serve`.
|
* Customize the Astro dev server, used by both `astro dev` and `astro preview`.
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* {
|
* {
|
||||||
|
@ -457,10 +457,10 @@ export interface AstroUserConfig {
|
||||||
* @default `false`
|
* @default `false`
|
||||||
* @version 0.24.0
|
* @version 0.24.0
|
||||||
* @description
|
* @description
|
||||||
* Set which network IP addresses the dev server should listen on (i.e. non-localhost IPs).
|
* Set which network IP addresses the server should listen on (i.e. non-localhost IPs).
|
||||||
* - `false` - do not expose on a network IP address
|
* - `false` - do not expose on a network IP address
|
||||||
* - `true` - listen on all addresses, including LAN and public addresses
|
* - `true` - listen on all addresses, including LAN and public addresses
|
||||||
* - `[custom-address]` - expose on a network IP address at `[custom-address]`
|
* - `[custom-address]` - expose on a network IP address at `[custom-address]` (ex: `192.168.0.1`)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -469,9 +469,15 @@ export interface AstroUserConfig {
|
||||||
* @type {number}
|
* @type {number}
|
||||||
* @default `3000`
|
* @default `3000`
|
||||||
* @description
|
* @description
|
||||||
* Set which port the dev server should listen on.
|
* Set which port the server should listen on.
|
||||||
*
|
*
|
||||||
* If the given port is already in use, Astro will automatically try the next available port.
|
* If the given port is already in use, Astro will automatically try the next available port.
|
||||||
|
*
|
||||||
|
* ```js
|
||||||
|
* {
|
||||||
|
* server: { port: 8080 }
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
server?: ServerConfig | ((options: { command: 'dev' | 'preview' }) => ServerConfig);
|
server?: ServerConfig | ((options: { command: 'dev' | 'preview' }) => ServerConfig);
|
||||||
|
|
Loading…
Reference in a new issue