-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update readme with alternative hostname option #4829
Conversation
readme.md
Outdated
@@ -1388,6 +1389,21 @@ export default () => <div> | |||
</div> | |||
``` | |||
|
|||
### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defualt
=> default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To start the development server using a different default hostname you can use --hostname or -H
option with next dev
.
readme.md
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will start a TCP server listening for connections on the provided host.
readme.md
Outdated
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence can be removed.
readme.md
Outdated
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence can also be removed.
readme.md
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meaning this line can be removed after changing that.
readme.md
Outdated
@@ -1388,6 +1389,10 @@ export default () => <div> | |||
</div> | |||
``` | |||
|
|||
### Starting a dev server on alternative IP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually works for both next
and next start
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Labeling it as Starting a server on alternative IP
would be better here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting the server on alternative hostname
and it'd be 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. 👍
Tackles the issue in #4025.
Fixes #4025