From 9f6453cf4972ac28eec4f07a1373feaa295c8864 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Tue, 2 Jan 2024 16:45:56 +0700 Subject: [PATCH] Document --host and --port flag for preview (#9572) --- .changeset/sixty-bugs-unite.md | 5 +++++ packages/astro/src/cli/preview/index.ts | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/sixty-bugs-unite.md diff --git a/.changeset/sixty-bugs-unite.md b/.changeset/sixty-bugs-unite.md new file mode 100644 index 0000000000..167cc4aa75 --- /dev/null +++ b/.changeset/sixty-bugs-unite.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Documents supported `--host` and `--port` flags in `astro preview --help` diff --git a/packages/astro/src/cli/preview/index.ts b/packages/astro/src/cli/preview/index.ts index 39bb2de0e6..0d569e2fba 100644 --- a/packages/astro/src/cli/preview/index.ts +++ b/packages/astro/src/cli/preview/index.ts @@ -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 ', `Expose on a network IP address at `], ['--open', 'Automatically open the app in the browser on server start'], ['--help (-h)', 'See all available flags.'], ],