Skip to content

Commit

Permalink
Basic markdown linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kapouer committed Mar 8, 2022
1 parent 23874da commit 71ff766
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
express-urlrewrite
==================
# express-urlrewrite

URL rewrite middleware for express.


## Examples

Rewrite using a regular expression, rewriting `/i123` to `/items/123`.
Expand Down Expand Up @@ -47,10 +45,10 @@ app.use(rewrite('/path', '/anotherpath?param=some'))

now updates req.query, so `req.query.param == 'some'`.


## New in version 1.2

rewrite can be used as a route middleware as in

```js
app.get('/route/:var', rewrite('/rewritten/:var'));

Expand All @@ -59,7 +57,6 @@ app.get('/rewritten/:var', someMw);

Instead of passing control to next middleware, it passes control to next route.


## Debugging

Set environment variable `DEBUG=express-urlrewrite`

0 comments on commit 71ff766

Please sign in to comment.