mirror of
https://github.com/expressjs/expressjs.com.git
synced 2026-02-21 19:41:33 +00:00
docs: improve the documentation of path matching behavior (#2036)
Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com>
This commit is contained in:
@@ -79,7 +79,8 @@ mounting middleware.
|
||||
<tr>
|
||||
<td>Path</td>
|
||||
<td markdown="1">
|
||||
This will match paths starting with `/abcd`:
|
||||
Matches the exact path `/abcd` and any sub-paths starting with `/abcd/` (for example, `/abcd/foo`):
|
||||
|
||||
|
||||
```js
|
||||
app.use('/abcd', function (req, res, next) {
|
||||
|
||||
@@ -80,7 +80,8 @@ mounting middleware.
|
||||
<tr>
|
||||
<td>Path</td>
|
||||
<td markdown="1">
|
||||
This will match paths starting with `/abcd`:
|
||||
Matches the exact path `/abcd` and any sub-paths starting with `/abcd/` (for example, `/abcd/foo`):
|
||||
|
||||
|
||||
```js
|
||||
app.use('/abcd', (req, res, next) => {
|
||||
|
||||
Reference in New Issue
Block a user