简体   繁体   中英

GET request going to front-end not back-end on Heroku

I have a MERN app that submits axios requests to a NodeJS backend server, but the requests are for some reason going to the front-end instead of the back-end. When set up locally the app works fine, but on Heroku it gives this error:

GET https://heroku-app-name.herokuapp.com/app/order?query=soap&page=1 500 (Internal Server Error)

The request is trying to GET from the front-end. Why is the proxy to the back-end no longer working?

After extensively looking at the logs, I discovered the app was going to the back-end for its API call, however, the MongoDB collection was created improperly. Fixing this has restored the app's functionality.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM