This is especially usefull when using ethers-build through a docker
container, one might pass --host 0.0.0.0 in order to correctly access
the web server from the container host.
The current hardcoded value 127.0.0.1 prevents this.
This PR will allow using ethers-cli serve in a container and access the web server from the host.
Here's an example:
$ docker run --rm -ti -v "$(pwd):/app" -w /app -p "8080:8080" gquemener/node-toolbox:latest ethers-build serve --host 0.0.0.0 --port 8080
Serving content from file:///app
Listening on port: 8080
Server Ethers app: http://localhost:8080/_/#!/app-link-insecure/localhost:8080/
You may now open the provided url in your favorite browser on your docker host.
As a bonus, this PR also fixes the --port option value which was ignored before.
This is especially usefull when using ethers-build through a docker container, one might pass
--host 0.0.0.0
in order to correctly access the web server from the container host.The current hardcoded value
127.0.0.1
prevents this.This PR will allow using
ethers-cli serve
in a container and access the web server from the host.Here's an example:
You may now open the provided url in your favorite browser on your docker host.
As a bonus, this PR also fixes the
--port
option value which was ignored before.