Open Adi1505-macintosh opened 3 years ago
Did you start the server in a separate terminal tab? I had this issue too, but having two terminals solved the problem. One runs the server and the other your react page.
I did it on separate terminal tab but still not running. One is running nodemon server (backend) and the other one is npm start. Anything else one has to add?
Did you add { useUnifiedTopology: true } to server.js mongoose.connect?
mongoose.connect(uri, { useNewUrlParser: true, useCreateIndex: true, useUnifiedTopology: true }
Still gives the same error. The backend is connected (port and database). It seems to be a front-end issue.
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (add, line 0)
[Error] Unhandled Promise Rejection: Error: Request failed with status code 404
(anonymous function) (vendors~main.chunk.js:1330)
promiseReactionJob
Hi, I'm having the same issue, front uses port :3000 and backend uses port :5000. Running both on different terminals gives me the status 404 error which does not let me fetch data from the server within the react app What seems to be the problem?
After coding the first time, I was able to run the application and connect to database properly. However, after a week when I tried to start the serve (nodemon serve & npm start), I don't see the database connected or any sucessfull port connection. The UI is visible but trying to add users gives this issue:
Same with adding exercise. No users visible. MongoDB shows that the relevant databases and records.
Any idea, what needs to be done while restarting the application on localhost?