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.

Add ability to configure which hostname/IP the server listens on

See original GitHub issue

Is there a way I can bind the server to 0.0.0.0 address with http-server, we do this -a flag http-server -a 0.0.0.0

with webpack-dev-server we do this with --host flag webpack-dev-server --host 0.0.0.0

This would be very useful when we deploy it inside containers

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
75lbcommented, Jul 9, 2017

fixed and released in v2.0.0

1reaction
christophgysincommented, Mar 25, 2017

this is resolved by the --hostname option in v2 which is in progress and available for preview https://github.com/lwsjs/local-web-server/tree/next… any feedback welcome.

​Nice! Tested, works as expected.

I would rename to option though, --hostname is confusing. The socket is bound to an IP address, not a hostname. Specifying a hostname requires a DNS lookup, which really makes no sense in this case.

In other tools, this option is usually called --bind, --listen or --address (with --bind being the most common).

​Also, from a security standpoint, a good habit would be to bind to localhost by default, and not expose the server to the outside.

echo mailto: NOSPAM !#$.'<>'|sed ‘s. …’|tr "<> !#:2" org@fr33z3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using P4PORT to control access to the server - Perforce
In this case, the server listens on the specified port for every IP address associated with this host. P4PORT= ipaddress | hostname :...
Read more >
How to specify the bind address for a JBoss EAP server
Start server with -b (bind-address) option, eg.: Raw ./standalone.sh -c myconfiguration -b <IP address or host name>. To set the bind address ...
Read more >
Servers: Configuration: General - Oracle Help Center
The name must be unique for all configuration objects in the domain. ... The IP address or DNS name this server uses to...
Read more >
Configure availability group listener - SQL Server Always On
Displays the identifier of each subnet that you add to the availability group listener. IP Address Displays the IP address of a given...
Read more >
Configure IP Address and Network Settings - BeyondTrust
Add or edit IP addresses for your B Series Appliance. Manage Telnet server ... Configure the default hostname and gateway, DNS servers, NTP...
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