Closed LySofDev closed 5 years ago
Unless you have a reason not too, you could probably add the option and pass the host as the second argument to the server.listen
call.
Node docs indicate that the second optional argument is the host.
Yes, for sure! I thought it was in there already but guess not.
I'll get it in tonight unless you want to beat me to it. Currently away from my computer - back soon
Hey, thanks
So I took care of --host, -H
support. While I was at it, I added support for HOST
and PORT
environment variables, which also should have been there.
These options are now available in sirv-cli@0.4.3
:
$ PORT=3000 sirv public
$ HOST=0.0.0.0 sirv public
$ sirv public --host 10.0.0.1
Thanks! :+1:
Hello Luke,
I wanted to try out the Svelte project which uses the
sirv-cli
as development server. I generally run my development environments from within Docker containers which require that a server bind to host0.0.0.0
. Otherwise, my browser is unable to connect to the development server.I tried using the
--cors
option to get past this issue but it didn't work. Am I perhaps missing something? Is it possible to bind your current implementation with an undocumented option?Unfortunately, I had to switch over to a different development server but would like to use the recommend one.
Thank you for your time and awesome package.