0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-31 23:31:30 -05:00

Document --host and --port flag for preview (#9572)

This commit is contained in:
Bjorn Lu 2024-01-02 16:45:56 +07:00 committed by GitHub
parent 35987afeb5
commit 9f6453cf49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Documents supported `--host` and `--port` flags in `astro preview --help`

View file

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