DEV Community

Discussion on: Connecting front-end and back-end with react and mongo DB - 404 error

Collapse
calebdeji profile image
calebdeji

Since the backend is hosted on port 8080, the call to the login endpoint should be localhost:8080/login

Collapse
manuelalonge profile image
Manuel Alonge Author

This seems logic, but I am not sure where to edit the port.

Collapse
calebdeji profile image
calebdeji • Edited on

What's the content of your .env file? Seems you saved your endpoint URL in your .env file?

Thread Thread
manuelalonge profile image
Manuel Alonge Author

SOLVED! thanks for help. I was wrongly indicating the URL in the main file. Thanks again.

Thread Thread
calebdeji profile image
calebdeji

You are welcome.