SwitcHosts local ip mapping domain name

1. SwitchHosts Download

Official website SwitchHosts - swh.app

Release SwitchHosts v4.1.2 · oldj/SwitchHosts · GitHub

 

 2. The port number is changed from 8080 to 80

// 端口号由8080 改为 80 端口
devServer: {
	https: false,
	port: 80,
	open: true, // opens browser window automatically
}

3. The host file can be configured, more flexible

windows host file lookup

  • C:\Windows\System32\drivers\etc\hosts
  • hosts is a system file with no extension

Mac host file lookup

  • With the Finder open, press Shift+Command+G on your keyboard.
  •  Enter the path of the hosts file in the window, /etc/hosts and click "Go" after entering.

4. The domain name setting has no effect

Make sure that the domain name settings are correct, and clear the browser cache to update successfully

Guess you like

Origin blog.csdn.net/yf18040578780/article/details/127194210