-
-
Notifications
You must be signed in to change notification settings - Fork 58
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 bind host to 0.0.0.0 #29
Comments
Unless you have a reason not too, you could probably add the option and pass the host as the second argument to the sirv/packages/sirv-cli/boot.js Line 61 in 11cc39a
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 These options are now available in $ PORT=3000 sirv public
$ HOST=0.0.0.0 sirv public
$ sirv public --host 10.0.0.1 |
Thanks! 👍 |
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.
The text was updated successfully, but these errors were encountered: