Skip to content

Commit 9f6453c

Browse files
authoredJan 2, 2024
Document --host and --port flag for preview (#9572)
1 parent 35987af commit 9f6453c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
 

‎.changeset/sixty-bugs-unite.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"astro": patch
3+
---
4+
5+
Documents supported `--host` and `--port` flags in `astro preview --help`

‎packages/astro/src/cli/preview/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ export async function preview({ flags }: PreviewOptions) {
1515
usage: '[...flags]',
1616
tables: {
1717
Flags: [
18+
['--port', `Specify which port to run on. Defaults to 4321.`],
19+
['--host', `Listen on all addresses, including LAN and public addresses.`],
20+
['--host <custom-address>', `Expose on a network IP address at <custom-address>`],
1821
['--open', 'Automatically open the app in the browser on server start'],
1922
['--help (-h)', 'See all available flags.'],
2023
],

0 commit comments

Comments
 (0)
Please sign in to comment.