简体   繁体   中英

Proxy Error when trying to Register or Login and no Network response

This is my first trial at web development. I used React-Redux and created a React.js app in the client folder. My backend code language is Node.js and MongoDb for my database.

This is my project.

https://github.com/FaridaElOraby/newest_version.git

It is working on my pc but when I tried to run it on another PC, I could not login or register. When I fill in the fields when logging in or registering and press on submit nothing happens. I should get redirected to the homepage or to login page. There is also no network response. I even tried to console the "res" in the backend to see if the info gets passed to the backend, there was nothing. I don't know why the backend does not see my request. There is a proxy error that pops up from localhost:3000 to localhost:5000 (server). If I don't fill in any fields and try to submit, an error pops up in the console Network Error bad request localhost:3000/api/user/register.

I was using mongoose for the DB at the backend and the mongo link was expired so it returned a network error. I changed the link at the backend with a working one and it wokred.

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