Skip to content

Fix regular expressions in server.js#1

Open
marcosvcg wants to merge 1 commit intogitdagray:mainfrom
marcosvcg:main
Open

Fix regular expressions in server.js#1
marcosvcg wants to merge 1 commit intogitdagray:mainfrom
marcosvcg:main

Conversation

@marcosvcg
Copy link
Copy Markdown

The Express v5 release update no longer supports “sub-expression” regular expressions. This release includes simplified patterns for common route patterns. With the removal of regular expression semantics comes other small but impactful changes to how you write your routes.

  1. :name? becomes {:name}. Usage of {} for optional parts of your route means you can now do things like /base{/:optional}/:required and what parts are actually optional is much more explicit.

  2. '*' becomes '*name'.

Oficial documentation:
https://expressjs.com/2024/10/15/v5-release.html

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.

1 participant