Vue init Webpack project name

Novice debugging project necessary skills, modify the project start port number, configure the interface code, allow THE LAN XDM access to my project address.

VUE Scaffolding Project: gitee.com/shuogesha/b…

Go to the build configuration directory config/index.js and go straight to the code

Core code dev below

// Paths

proxyTable: {

‘/ API /’: {// API is the proxy interface address

// target:”http://192.168.1.118:9002/mall/ “, / / here is my agent address

target: “http://localhost:8080/”// Here is my proxy address

ChangeOrigin: true, // Whether spanning is allowed

pathRewrite: {

‘^/api’: ‘/api’

}

},

‘/upload/’: {// API is the proxy interface address

// target:”http://192.168.1.118:9002/mall/ “, / / here is my agent address

target: “http://localhost:8080/”// Here is my proxy address

ChangeOrigin: true, // Whether spanning is allowed

pathRewrite: {

‘^/upload’: ‘/upload’

}

}

},

Modify the port

// Various Dev Server settings

Host: ‘0.0.0.0’, // can be overwritten by process.env.host

port: 18080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined