Repository navigation
Update route guide - #1626
Update route guide#1626
Conversation
✅ Deploy Preview for expressjscom-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Co-authored-by: Blake Embrey <hello@blakeembrey.com>
| @@ -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. | |||
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
cc: @expressjs/docs-wg
|
Once the discussions are solve, I think that we can land it :) |
|
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 |
No description provided.