http-party / http-server

a simple zero-configuration command-line http server
MIT License
13.42k stars 1.48k forks source link

Bypass etc/hosts for virtual domains #820

Open wassim-ben-amor opened 2 years ago

wassim-ben-amor commented 2 years ago

What's the problem this feature will solve?

Using http-server -P parameter to use a local virtual domain, we still need to update /etc/hosts file to be able to access the local virtual domain using http-server.

Describe the solution you'd like

My idea is to find a way to use a new virtual domain without modifying /etc/hosts file. This can be achieved by using dns to modify the OS host file and use dns.lookup() to pull from the host file.

Alternative Solutions

Additional context

github-actions[bot] commented 1 year ago

This issue has been inactive for 180 days