Update readme with alternative hostname option - #4829
Conversation
|
|
||
| ### Starting a dev server on alternative IP | ||
|
|
||
| To start the dev server using a hostname different from the defualt `localhost` you can use the provided `--hostname or -H` option with `next dev`. |
There was a problem hiding this comment.
To start the development server using a different default hostname you can use --hostname or -H option with next dev.
| next dev <dir> -H 127.0.0.1 | ||
| ``` | ||
|
|
||
| This will start the TCP server listenting for connections on the provided host. |
There was a problem hiding this comment.
This will start a TCP server listening for connections on the provided host.
|
|
||
| This will start the TCP server listenting for connections on the provided host. | ||
|
|
||
| If hostname is omitted, the server will accept connections on the unspecified IPv6 address ( :: ) when IPv6 is available, or the unspecified IPv4 address (0.0.0.0) otherwise. |
There was a problem hiding this comment.
This sentence can be removed.
|
|
||
| If hostname is omitted, the server will accept connections on the unspecified IPv6 address ( :: ) when IPv6 is available, or the unspecified IPv4 address (0.0.0.0) otherwise. | ||
|
|
||
| Note: While allowed, listening to 0.0.0.0 is considered a bad practice and it may pose as a security vulnerability. |
There was a problem hiding this comment.
This sentence can also be removed.
| To start the dev server using a hostname different from the defualt `localhost` you can use the provided `--hostname or -H` option with `next dev`. | ||
|
|
||
| ```bash | ||
| next dev <dir> -H <hostname> |
There was a problem hiding this comment.
I believe this could be made redundant when you change above --hostname or -H to --hostname hostname_here or -H hostname_here
There was a problem hiding this comment.
Meaning this line can be removed after changing that.
| </div> | ||
| ``` | ||
|
|
||
| ### Starting a dev server on alternative IP |
There was a problem hiding this comment.
It actually works for both next and next start.
There was a problem hiding this comment.
Labeling it as Starting a server on alternative IP would be better here ?
There was a problem hiding this comment.
Starting the server on alternative hostname and it'd be 👍
Tackles the issue in #4025.
Fixes #4025