question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't access server over local network

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
lukeedcommented, Jun 26, 2020

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 --host message in the absence of the flag. @mhkeller If you open that PR for readme and/or the hint, I’ll fiddle with the styling.

Thanks!

2reactions
Rich-Harriscommented, Jun 26, 2020

FWIW I think @mhkeller makes a good point about people consuming sirv indirectly — it’s not clear from this…

sirv-cli screenshot

…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…

Your application is ready!~

- Local: http://localhost:8080
- Network: use `--host` to expose to the network

…it’d be worth pointing people to the project directly:

Your application is ready!~

- Local: http://localhost:8080

Visit https://github.com/lukeed/sirv for more info
Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] can't access to my server on my local network
Hello everyone,. I need help for accessing to my local server who was reachable 1 month ago. for details: PC (Windows 10) :...
Read more >
What can be the reason I cannot access local host from other ...
localhost itself means that the host is located on the local computer so it cannot be accessed directly from an external computer. when...
Read more >
Cannot access my website over LAN network or localhost
The problem is you are trying to access resource from inside lan by using a public address. Most routers get confused with that....
Read more >
I can't access my own web server from my local network, but ...
I've just noticed that on the Port Forwarding tab, the wan interface should be pppoe0, because your external IP is provided by the...
Read more >
I cannot access devices on my local network. Why? - IVPN Help
If you want to access & use i.e. printer (or any other device) that resides on your Local network – in the IVPN...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found