mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
feat: allow different host through CLI flag (#1475)
* feat(core): use 0.0.0.0 for livereload address * test(core): update server tests * feat(cli): add host by command line flag * test: revert test changes * fix(core): update server to use custom host if supplied * refactor: nits
This commit is contained in:
parent
382b88bb49
commit
0568ad4992
6 changed files with 13 additions and 8 deletions
|
@ -146,6 +146,7 @@ This command will build the static website, apply translations if necessary, and
|
|||
| Options | Default | Description |
|
||||
| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `--port <number>` | `3000` | The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one. |
|
||||
|`--host <host>`|`localhost`|Specify a host to use. E.g., if you want your server to be accessible externally, you can use --host 0.0.0.0.|
|
||||
| `--watch` | - | Whether to watch the files and live reload the page when files are changed. Defaults to true. Disable this by using `--no-watch`. |
|
||||
|
||||
You can specify the browser application to be opened by setting the `BROWSER` environment variable before the command, e.g.:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue