You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an back-end API server running locally on port 2080, and I want my front-end which running locally as well to call this local API server, because I want to do integrate test between front-end and back-end.
But I found that Proxy didn't work when proxy and API endpoint configs both exist(just returned the response.json, and API server didn't receive any request ):
Environment
"mocker-api": "^1.12.2"
Issue
I have an back-end API server running locally on port 2080, and I want my front-end which running locally as well to call this local API server, because I want to do integrate test between front-end and back-end.
But I found that Proxy didn't work when proxy and API endpoint configs both exist(just returned the response.json, and API server didn't receive any request ):
(Chinese translation) 我在本地有前端和后端两个服务,后端API server运行于端口2080,如下, 如果我同时配置proxy和endpoint,只会返回
/response.json
,并没有proxy到2080的API server。这无法完成本地前后端联调测试的需求。If I remove the endpoint config, front end will call proxy which is
http://localhost:2080/
:(Chinese translation) 如果我删除endpoint配置,只留proxy,这时
/api/v1/login/
可以转发到我的本地2080 API server中。Then the API server locally will receive request call for
/api/v1/login/:userId
now.Please help about what's wrong here?
Thanks
The text was updated successfully, but these errors were encountered: