app与jvm 反向代理时config的设置(用于在web页面显示npm(就如tomcat)产生的页面)

dev: {
// Various Dev Server settings
contentBase: ROOT,
host: ip,
port: 8084,    //此端口为任意设置,不重复即可,为页面打开显示 的地址
historyApiFallback: true,
open: true,
watchContentBase: true,
openPage: '',
watchOptions: {
ignored: /node_modules/,
aggregateTimeout: 300,
poll: false
},

proxyTable: {

'/api': {
target: 'http://192.168.244.1:8083',   //注意: 此为本机地址与eclipse中yml中的端口号   这里即是反向代理
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
}


},

猜你喜欢

转载自www.cnblogs.com/houlai/p/8973820.html
今日推荐