express icon indicating copy to clipboard operation
express copied to clipboard

Update index.js

Open leeli0 opened this issue 1 year ago • 4 comments

Add remarks for wildcard parameters of Express 5.x

leeli0 avatar Nov 05 '24 04:11 leeli0

Hi @UlisesGascon :wave:

Did we have a plan to separate the examples from this repository?

IamLizu avatar Nov 05 '24 05:11 IamLizu

Yes I believe that is the plan: https://github.com/expressjs/express/issues/5309

For now though, I am not a big fan of a version specific comment like this. The master branch now is v5, so if you are interested in examples for express@4 then I would suggest we direct folks to the 4.x branch.

EDIT: oops, early send.

That said, the other part of this change is good imo.

wesleytodd avatar Nov 05 '24 10:11 wesleytodd

Directly runing the example in the repository environment is perfect. Nevertheless, if try the example in a project and the npm install express@4 as default would cause some inconvenience. Also, Route parameters of Express 5.x API doesn't metion the use of wildcard parameters, so for newbies like me might feel confusing of the '/files/*file' route path.

leeli0 avatar Nov 07 '24 02:11 leeli0

Hm, that's great feedback. I am not sure what the best way is to do this. Maybe we could make the comment "this changed in 5.0.0, see our migration guide (link) for more details"?

wesleytodd avatar Nov 15 '24 15:11 wesleytodd