客户端托管MERN堆栈时,API调用不会发送到服务器

时间:2020-04-24 17:22:26

标签: reactjs express server production mern

我使用urge.sh托管了我的react应用程序

https://deranged-ticket.surge.sh/

并且我的Web服务器正在localhost:5000上运行,因此,当我的前端应用程序发出api请求时,它会转到另一个URL as you can see in this image。我该怎么去

https://localhost:5000/api/v1/transactions而不是 https://deranged-ticket.surge.sh/api/v1/transactions

0 个答案:

没有答案
相关问题