打开config文件夹写index.js
- index.js里面
dev : {
env : require('./dev.env'),
port : 8080,
autoOpenBrowser : true,
assetsSubDirectory: 'static',
assetsPublicPath : '/',
proxyTable : {
'/api' : {
target : 'http://192.168.1.101:8080',
changeOrigin: true,
pathRewrite : {
'^/api': '/api'
}
},
}
设置端口和后台连接地址