3

I'm intergrating feathers js both on backend and frontend and I got page not found error when I tried this implementation. I would appreciate your help. thanks for the awesome work!

code https://github.com/react-boilerplate/react-boilerplate/issues/2355

1 Answers1

2

This is the same problem discussed in this FAQ.

Just like in Express itself, the order of middleware matters. If you registered a custom middleware outside of the generator, you have to make sure that it runs before the notFound() error midlleware.

This means that

app.use(express.notFound());

Always has to be the last app.use call.

Daff
  • 43,734
  • 9
  • 106
  • 120