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

Add option to specify host name (host and -h or --host respectively) #167

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gorankarlic
Copy link

Add option to specify host name (host and -h or --host respectively). Resolves #161.

@napcs
Copy link
Owner

napcs commented Jan 17, 2023

@gorankarlic can we use -b and --bind instead?

@andrewshawcare
Copy link

Can we merge this?

@@ -58,7 +58,8 @@ $ livereload ~/website

The commandline options are

* `-p` or `--port` to specify the listening port
* `-p` or `--port` to specify the listening port.
* `-h` or `--host` to specify the host name to which to bind the server.
Copy link
Owner

Choose a reason for hiding this comment

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

@gorankarlic looks like this should change too.

Suggested change
* `-h` or `--host` to specify the host name to which to bind the server.
* `-b` or `--bind` to specify the host name to which to bind the server.

@@ -146,6 +147,7 @@ The first are some configuration options, passed as a JavaScript object:

* `https` is an optional object of options to be passed to [https.createServer](http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener) (if not provided, `http.createServer` is used instead)
* `port` is the listening port. It defaults to `35729` which is what the LiveReload extensions use currently.
* `host` is the host name to which to bind the server. It defaults to `localhost`.
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
* `host` is the host name to which to bind the server. It defaults to `localhost`.
* `bind` is the host name to which to bind the server. It defaults to `localhost`.

@@ -230,6 +232,10 @@ When submitting code, please keep commits small, and do not modify the README fi

# Changelog

### 0.9.4
* Server: Added `host` option to specify the host name to bind the server to.
* CLI: Added `-h` or `--host` option to specify the host name to bind the server to.
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
* CLI: Added `-h` or `--host` option to specify the host name to bind the server to.
* CLI: Added `-b` or `--bind` option to specify the host name to bind the server to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support configuring the interface (i.e. host) the server will listen to
3 participants