跟新api
This commit is contained in:
parent
eacc60ea86
commit
dfe838b7b0
|
@ -27,7 +27,6 @@ function SubjectPage(){
|
|||
test()
|
||||
},[])
|
||||
|
||||
|
||||
const [EndTestList,setEndTestList]=useState([])
|
||||
//获取他已经做过的试卷
|
||||
const end_test=async()=>{
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
const proxy=require("http-proxy-middleware")
|
||||
module.exports=function(app){
|
||||
app.use(proxy(['/api'],{target:"http://localhost:5000"}))
|
||||
}
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
|
||||
module.exports = function(app) {
|
||||
app.use(
|
||||
'/api', // 如果请求路径匹配'/api',则进行代理
|
||||
createProxyMiddleware({
|
||||
target: 'http://localhost:5000', // 目标后端服务地址
|
||||
changeOrigin: true,
|
||||
})
|
||||
);
|
||||
};
|
Loading…
Reference in New Issue