部署到heroku时无法通过redux连接到我的后端

时间:2020-11-10 11:12:21

标签: reactjs heroku redux deployment

我希望有人能提供帮助。我已将我的应用程序部署到heroku,当我单击“自行车”按钮时,它应该从我的快递服务器上获取我的数据,但是该请求在redux中失败,响应被拒绝。它在我的本地计算机上可以处理从localhost:3000到localhost:5000的请求。部署时没有收到任何错误消息,但是在本地运行时却收到此错误

反应错误

Proxy error: Could not proxy request /shop/bikes from localhost:3000 to http://localhost:5000/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).

我的package.json反应代理

"proxy": "http://localhost:5000/",

但是,尽管出现了此错误消息,我的应用程序仍可以与服务器一起使用,但是当我进行配置配置时,它会被拒绝。有人可以帮忙,这是一个问题吗?

这是已部署的heroku应用程序的链接

https://my-basic-e-commerce-site.herokuapp.com/

0 个答案:

没有答案