How to configure VUE localhost and IP can be accessed

set to: host: "localhost" local IP cannot be accessed
set to: host:" 0.0.0.0" both local IP and localhost can be accessed, but every time you open it, you have to modify it manually. Is there any way to solve it?

Mar.10,2021

host: "0.0.0.0",
useLocalIp: true,
will do


1. Modify the configuration file of webpack
modify the host property in webpack.dev.js to '0.0.0.0'
2. Modify the command line parameters that enable webpack-dev-server in package.json, such as: dev start followed by
-- host 0.0.0.0


The dev of

script is followed by -- host 0.0.0.0

"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 0.0.0.0"

I usually have these in host:

127.0.0.1         localhost
255.255.255.255     broadcasthost
::1              localhost
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5a10d-4405c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5a10d-4405c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?