Skip to content

Conversation

kushal4345
Copy link
Contributor

This PR updates the documentation to address #1941 issue

Adds a note explaining that:

app.use() uses prefix-based path matching (e.g., /api will match /api/users).
HTTP method handlers (app.get(), app.post(), etc.) use exact path matching (e.g., app.get('/api') will only match /api).
Provides a clear code example to highlight the difference.
Ensures users are not confused when switching between app.use() and route methods.

This improves the clarity of the path examples section in the docs.

@kushal4345 kushal4345 requested a review from a team as a code owner August 19, 2025 05:18
Copy link

netlify bot commented Aug 19, 2025

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 6196bd0
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/68b3c82b171fde0008a4a1e0
😎 Deploy Preview https://deploy-preview-2045--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

🚦 Lighthouse Results (Mobile & Desktop)

URL Device Perf A11y Best Practices
/ mobile 🔴 69 🟢 100 🟢 96
/en/blog/posts.html mobile 🟢 96 🟢 96 🟢 96
/en/5x/api.html mobile 🔴 74 🟢 95 🟢 96
/ desktop 🟢 99 🟢 100 🟢 96
/en/blog/posts.html desktop 🟢 99 🟢 96 🟢 93
/en/5x/api.html desktop 🟢 97 🟢 95 🟢 96

@kushal4345
Copy link
Contributor Author

I wanted to kindly follow up on my PR submitted about two weeks ago that updates the documentation to clarify the difference between app.use() prefix-based path matching and route methods’ exact path matching (addresses issue #1941).

Please let me know if any further changes or adjustments are needed from my side. I’d be happy to make updates to help get it merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants