Skip to content
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

Merged
merged 4 commits into from
Jul 26, 2018
Merged

Update readme with alternative hostname option #4829

merged 4 commits into from
Jul 26, 2018

Conversation

stefanivic
Copy link

@stefanivic stefanivic commented Jul 24, 2018

Tackles the issue in #4025.

Fixes #4025

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`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defualt => default

Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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>
Copy link
Member

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

Copy link
Member

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
Copy link
Member

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.

Copy link
Author

@stefanivic stefanivic Jul 24, 2018

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 ?

Copy link
Member

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 👍

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. 👍

@stefanivic stefanivic changed the title Update readme with next-dev hostname option Update readme with alternative hostname option Jul 24, 2018
@timneutkens timneutkens merged commit fc05c9c into vercel:canary Jul 26, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to use a local IP address instead of localhost ?
2 participants