vue modify the start and host port

Open vue project (dev)

dev / config / file path modify index.js

 

Then the host can be specified and modified pord

host: 'localhost', // can be overwritten by process.env.HOST
port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-

  

Guess you like

Origin www.cnblogs.com/Jack-cx/p/11371268.html