five-server icon indicating copy to clipboard operation
five-server copied to clipboard

Host argument not working & hosts aliases suggestion

Open MrBenHacker opened this issue 3 years ago • 3 comments

Describe the bug Host doesn't seem to be working (or at least not correctly diplayed in the console)

five-server --host=0.0.0.0 image

Question Also, is it possible to make host a virtual host defined by the user /etc/hosts

So for example web 127.0.0.1 (in the hosts file) using five-server --host=web correspond to http://web:5500

MrBenHacker avatar Jul 06 '22 14:07 MrBenHacker

Any update?

MrBenHacker avatar Aug 26 '22 14:08 MrBenHacker

The default host is 0.0.0.0.

When using os.networkInterfaces(), you get 127.0.0.1 and 192.168.1.67. 127.0.0.1 will be displayed as localhost. So you will see:

Five Server running at:

> Network:  http://192.168.1.67:5500
> Local:    http://localhost:5500

I tried to set web 127.0.0.1 and it worked:

Five Server running at: 

> Local: http://web:5500

yandeu avatar Aug 26 '22 21:08 yandeu

Oh so 0.0.0.0 is by default, thanks for this details!

You are right, I realized it's working using --host=web if set in the /etc/hosts, I don't know why I was struggling with that

Regarding this option, I saw that it's not availaible in the VSCode extension (https://github.com/yandeu/five-server-vscode), is it possible to add it?

MrBenHacker avatar Aug 29 '22 07:08 MrBenHacker

Closed by https://github.com/yandeu/five-server-vscode/pull/23

yandeu avatar Jan 30 '23 16:01 yandeu