DEV Community

loading...

POST http://localhost:3000/login 404 (Not Found)

Manuel Alonge
・1 min read

I am working on this web app: https://github.com/manuelalonge/complex-app with this back-end api: https://github.com/LearnWebCode/react-course/tree/master/backend-api - It was working perfectly well while logging in I occurred the following issue in the console: xhr.js:178 POST http://localhost:3000/login 404 (Not Found) - it looks like the front-end cannot reach the back-end anyhow. Any suggestions on how to solve it?

Discussion (6)

Collapse
pankajtanwarbanna profile image
Pankaj Tanwar

you might have missed app.use("/", require("./router"))

Collapse
manuelalonge profile image
Manuel Alonge Author

Hi, in which component?

Collapse
pankajtanwarbanna profile image
Pankaj Tanwar

In main server file.

Thread Thread
manuelalonge profile image
Manuel Alonge Author

The line of code you told me is actually there.

Collapse
devangagarwal7 profile image
Devang Agarwal

hey did you figured it out ? I am facing same issue

Collapse
manuelalonge profile image
Manuel Alonge Author

Unfortunately it was long time ago and do not remember how I solved this