2.5. hosts file

In the previous section, localhost was used as the domain, which is a pseudonym for the IP address On the local host, the alias for the IP address is specified in the hosts file, which in a UNIX-like operating system can be found in /etc/hosts, and in Windows in C:\Windows\system32\drivers\etc\hosts.

Как правило, в файле присутствуют как минимум две записи, сопоставляющие домену localhost локальный IР-адрес в 1Pv4- и 1Рv6-форматах: localhost
::1 localhost

It is the presence of these records allowed us to launch the built-in server using localhost as the domain. In order to configure alternative aliases, you can add additional entries: site.dev www.site.dev project.dev www.project.dev

IP addresses starting with 127 are intended for local use, so you can assign any address from this range to test your own projects.

After adding new aliases to the hosts file, they can be used in conjunction with the built-in server, for example http://site.dev:4000/.