bradtraversy / devconnector_2.0

Social network for developers, built on the MERN stack
1.92k stars 1.26k forks source link

Using proxy in client but also send api request to port 3000 #98

Closed DikshantNiraula closed 4 years ago

DikshantNiraula commented 4 years ago

Hello Brad Traversy, I took your udemy course of devconnector 2 using MERN and I did exactly as you did but sending request using axios while login or registration, in console it shows that it is sending request to port 3000 like: http://localhost:3000/api/auth Please help me with this..I spent 1 whole day to solve but no benifit. Thank you..

bushblade commented 4 years ago

Hi @DikshantNiraula For questions and help related to the course, please post in the course Q&A In the bowser requests will show that they go to port 3000 as that's the port the react app is running on. We do this so we don't break SOP. So in the browser requests will go to 3000, that's the point of the proxy. Create React App dev server proxies the request to port 5000. I'll close this as an issue.