三样两语简单说清
平时项目接口结构
https:域名 + 接口 api
http://localhost:8080/xxx/three
proxy代理多个接口 socket 长链接
http = api接口 需要的时候再请求
socket = 一直保持链接
module.exports = {
// publicPath: '',
outputDir: 'market-web',
lintOnSave: false,
pages: {
'index': {
entry: 'src/main.js',
template: 'public/index.html',
filename: 'index.html',
title: 'simple demo index page'
}
},
devServer: {
open: true,
openPage: '/index.html',
port: 12998,
proxy: {
'/apis': {
// target: 'http://localhost:12600',
target: 'http://www.yumingjiekou.info:12600',
pathRewrite: {'/apis': ''}
}
}
}
}