Skip to content

Clarify path matching behavior in Express.js documentation#2036

Merged
bjohansebas merged 4 commits intoexpressjs:gh-pagesfrom
kushal4345:fix-docs-path-example
Aug 18, 2025
Merged

Clarify path matching behavior in Express.js documentation#2036
bjohansebas merged 4 commits intoexpressjs:gh-pagesfrom
kushal4345:fix-docs-path-example

Conversation

@kushal4345
Copy link
Copy Markdown
Contributor

Summary

Updated the path examples documentation to clarify that route matching in Express.js is exact by default, unless path patterns, wildcards, or regular expressions are used.

Details

Previously, the docs said “This will match paths starting with…”, which could be interpreted as matching partial strings (e.g., /abcde) when using app.use('/abcd', ...). This is misleading because Express matches exact paths unless explicitly configured otherwise.

Change

@kushal4345 kushal4345 requested a review from a team as a code owner August 11, 2025 03:56
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 11, 2025

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 86aa1d9
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/68a29f959e6c6d00088802eb
😎 Deploy Preview https://deploy-preview-2036--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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 11, 2025

🚦 Lighthouse Results (Mobile & Desktop)

URL Device Perf A11y Best Practices
/ mobile 🔴 63 🟢 100 🟢 96
/en/blog/posts.html mobile 🔴 73 🟢 96 🟢 96
/en/5x/api.html mobile 🔴 61 🟢 95 🟢 96
/ desktop 🟢 95 🟢 100 🟢 96
/en/blog/posts.html desktop 🟢 94 🟢 96 🟢 93
/en/5x/api.html desktop 🟢 93 🟢 95 🟢 96

Copy link
Copy Markdown
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution, just a small comment from my side.

Comment thread _includes/api/en/4x/app-use.md Outdated
Comment thread _includes/api/en/5x/app-use.md Outdated
Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com>
@kushal4345
Copy link
Copy Markdown
Contributor Author

I’ve pushed the requested changes. Please let me know if anything else is needed

Copy link
Copy Markdown
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @kushal4345!

@bjohansebas bjohansebas added 5.x Docs for 5.x version 4.x Docs for 4.x version labels Aug 18, 2025
@bjohansebas bjohansebas merged commit 53b9a0e into expressjs:gh-pages Aug 18, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.x Docs for 4.x version 5.x Docs for 5.x version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Path examples documentation is misleading

2 participants