Created by: danieldunderfelt
I just spend some time debugging an inexplicable error where my route handler was not being called but the site continued working. Turns out, express.static will override a /
route when the index.html
file is found in the static root. No server example (this included until now) of serving a CRA app has made note of this. Setting index: false
on the static middleware turns off this behaviour and returns control to the route handler.
I ran into this using Express v4.17.1 and using no other Express middeware than express.static.