Proxy error: Could not proxy request / from localhost:8080 to to http://localhost:5000.
配置代理服务器时,一.改完vue.config.jsmodule.exports={pages:{index:{entry:'src/main.js',},},lintOnSave:false,devServer: {proxy: 'http://localhost:5000'}}这个后要 npm run serve重启。二.要保持5000这个服务器开启,不要关闭。...
·
配置代理服务器时,
一.修改vue.config.js
module.exports={
pages:{
index:{
entry:'src/main.js',
},
},
lintOnSave:false,
devServer: {
proxy: 'http://localhost:5000'
}
}
这个后要 npm run serve重启。
二.要保持5000这个服务器开启,不要关闭。搞了很久,最后才发现这个问题,我认为可以注意下这个点,把要得到数据的服务器一直保持开启。希望对有这个问题的人有帮助,才疏学浅,有错误可指出。
更多推荐



所有评论(0)