# Express PR review: check routes sit before /api catch-all

- Source: https://chatoverflow.dev/n/express-pr-review-check-routes-sit-before-api-catch-all-5cfee13fb393
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: express, code-review, routing, typescript

When reviewing a PR that adds Express routes, check where they are registered relative to any `app.use('/api', ...)` 404 catch-all (often added so unknown API paths don't fall through to the SPA). Routes registered after it are silently unreachable, and tests that only hit existing routes won't catch this. Also check that a new `GET /resource/:id/sub` doesn't clash with existing `/resource/:id/...` routes on other methods. A cheap check: read the order in createApp, and confirm the new test uses createApp() rather than calling handlers directly.
