Skip to content

Update route guide - #1626

Merged
bjohansebas merged 7 commits into
expressjs:gh-pagesfrom
bjohansebas:update-route-guide
Jan 6, 2025
Merged

bjohansebas merged 7 commits into
expressjs:gh-pagesfrom
bjohansebas:update-route-guide

Conversation

@bjohansebas

Copy link
Copy Markdown
Member

No description provided.

@netlify

netlify Bot commented Sep 21, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 79b7b7b
🔍 Latest deploy log https://app.netlify.com/sites/expressjscom-preview/deploys/675b4c352795520008e56164
😎 Deploy Preview https://deploy-preview-1626--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 site configuration.

@bjohansebas
bjohansebas requested review from a team September 21, 2024 01:11
Comment thread en/guide/routing.md Resolved
Comment thread en/guide/routing.md Resolved
bjohansebas and others added 2 commits October 16, 2024 18:07
Co-authored-by: Blake Embrey <hello@blakeembrey.com>
Comment thread en/guide/routing.md Resolved
Comment thread en/guide/routing.md
@@ -68,19 +68,24 @@ app.all('/secret', (req, res, next) => {

Route paths, in combination with a request method, define the endpoints at which requests can be made. Route paths can be strings, string patterns, or regular expressions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Route paths, in combination with a request method, define the endpoints at which requests can be made. Route paths can be strings, string patterns, or regular expressions.
Route paths, in combination with a request method, define the endpoints at which requests can be made. Route paths can be strings or regular expressions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was thinking about removing that part when I edited this file for the first time. Although it doesn’t work in Express 5, string patterns are present in version 4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense, I think "string pattern" is confusing... they're both strings. It's just Express 4 and 5 support strings of different syntax within the strings. I was thinking it'd be clearer to just note that the strings are different DSLs, and Express 4 happened to support regex characters, and if you wanted those characters literally they needed to be escaped.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It also depends on whether this doc is v5 first or v4 first I guess, but since the doc doesn't touch much on things that changed between the versions (i.e. * -> *name, etc) it might be easier to have it be things supported by each overall with caveats afterward for 4 vs 5 specifics?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Although a note was added below stating that string patterns are not supported in version 5, so I'm not sure if it would be good to make the change you suggested.

If you want to make any further changes that you think are important to improve the router guide, it's enabled for maintainers to make edits. You know more about how the router works

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

cc: @expressjs/docs-wg

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@expressjs/docs-wg

Comment thread en/guide/routing.md Resolved

@juliogarciape juliogarciape left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@UlisesGascon

Copy link
Copy Markdown
Member

Once the discussions are solve, I think that we can land it :)

@bjohansebas

Copy link
Copy Markdown
Member Author

I've updated the playground on my end to bring it back, as I think it's something good to have on the page. If you'd like, it can be moved to this organization.

Also, this hasn't been moved in a long time, so if there are no objections, I'll merge it by the end of next week.

cc: @expressjs/express-tc @expressjs/docs-wg

@bjohansebas
bjohansebas merged commit 428d518 into expressjs:gh-pages Jan 6, 2025
@bjohansebas
bjohansebas deleted the update-route-guide branch January 6, 2025 16:11
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.

6 participants