This is the simple SPA, which should send the data from its form and getting respomse. But every request ends up with the message ("Uncaught (in promise) Error: Request failed with status code 404") and I can't resolve this problem.Here is my FormComponent code:Controller API:And Comment Model:I can't get, what I'm doing wrong.
It seems to me it is very simple mistake, but I spendfor it a few hours and couldnt find any solution.
Thanl you in advance!!!!P.S. Sorry for my English.
Modified2 years, 4 months ago.
The React-Redux front end production server is running on port 3000 (localhost:3000).
However, axios always ignores the proxy values, and uses the client-side production build server, to make the api call to the express backend which sensibly returns a 404 error.
If any one can let me know if I'm actually tackling the problem, but my efforts just aren't fruitful, or I'm completely missing the point here. Referring to this post I think you can do the following.. After some testing on my app (same setup as above) and some reading, I found that this is a known issue with axios.
Adrian BeloquiAdrian Beloqui. This implementation works:.