http-proxy-middleware安装npm install http-proxy-middleware --save-dev
在项目目录下找config文件加下的index.js文件,打开文件设置proxyTable属性:
设置host :
const Host = process.env.HOST || '0.0.0.0';

具体请查看http-proxy-middleware文档。
http-proxy-middleware安装npm install http-proxy-middleware --save-dev
在项目目录下找config文件加下的index.js文件,打开文件设置proxyTable属性:
设置host :
const Host = process.env.HOST || '0.0.0.0';
具体请查看http-proxy-middleware文档。
本文标题:vue 设置api接口代理
本文链接:https://www.haomeiwen.com/subject/hjhrfctx.html
网友评论