-
-
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
Can't access server over local network #70
Comments
Hey, You have to specify By default, it's purely a localhost server (aka, private) since that's all a server needs -- and it's a better default to have, especially when coffeeshops/shared spaces were a thing. |
Haha I vaguely remember coffeeshops. Got it. I think maybe adding that you can expose it to the local network by setting |
Maybe adding a line to the default console output could be helpful for people who may be coming from svelte template land and might not know to look at sirv. Something like this perhaps?
|
I'd be happy to do a PR to help take the load off! |
Ah ya, if you're up for a PR can you add a section to the CLI's readme, above the HTTP/2 section? I don't think it should live inside the CLI text output. I don't know if I consider sirv-cli primarily a dev tool. But adding it as a an example in the helptext sounds like a good addition! The svelte templates have updated a lotttt wrt |
FWIW I think @mhkeller makes a good point about people consuming sirv indirectly — it's not clear from this... ...that there's a package called 'sirv' involved, so people might not know where to look. Given that similar packages do expose the server to the network, I can definitely see how it could be a source of confusion. Perhaps as an alternative/addition to this...
...it'd be worth pointing people to the project directly:
|
I like how both of you interpret my Yeah, I've been thinking about it and I think it would be better to show a Thanks! |
Haha woops that's my typo transposing the So to recap, @lukeed you're preferring this proposal?
|
Yup, some variant of that should do the trick. Don't need my name showing up front & center |
* improvement(sirv-cli): Add local network info (#70) * test(serve-cli): Add test for new example * fix: update bin example * chore: readme section * chore: tweak styling Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
When I launch a server via sirv-cli, I can't access that server from another computer on the local network. I put together this reproduction repo so you can see how this issue doesn't occur with two other libraries.
I tried it with
-c
and--cors
but that didn't fix it. If I manually set the local ip address via-H
that does fix it.The text was updated successfully, but these errors were encountered: