Skip to content

Update readme with alternative hostname option - #4829

Merged
timneutkens merged 4 commits into
vercel:canaryfrom
stefanivic:canary
Jul 26, 2018
Merged

Update readme with alternative hostname option#4829
timneutkens merged 4 commits into
vercel:canaryfrom
stefanivic:canary

Conversation

@stefanivic

@stefanivic stefanivic commented Jul 24, 2018

Copy link
Copy Markdown

Tackles the issue in #4025.

Fixes #4025

Comment thread readme.md Outdated

### 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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

defualt => default

Copy link
Copy Markdown
Contributor

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.

Comment thread 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
Copy Markdown
Contributor

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.

Comment thread 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
Copy Markdown
Contributor

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.

Comment thread 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
Copy Markdown
Contributor

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.

Comment thread 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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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.

Comment thread readme.md Outdated
</div>
```

### Starting a dev server on alternative IP

Copy link
Copy Markdown
Contributor

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.

@stefanivic stefanivic Jul 24, 2018

Copy link
Copy Markdown
Author

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
Copy Markdown
Contributor

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
Copy Markdown
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