Skip to content

Commit

Permalink
Merge pull request #33 from kethinov/2.0.1
Browse files Browse the repository at this point in the history
2.0.1
  • Loading branch information
kethinov authored Nov 20, 2021
2 parents 09b2a06 + cf48fa3 commit 028c7e0
Show file tree
Hide file tree
Showing 5 changed files with 292 additions and 268 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

- Put your changes here...

## 2.0.1

- Added `router.stack` feature.
- Bumped various dependencies.

## 2.0.0

- Transferred ownership of this repo to the Roosevelt framework.
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,25 @@ pageExpressMapper({

Default: `undefined`

The `router` object returned by `pageExpressMapper()` also has a member object called `stack` indexed by route with member booleans for whether the route accepts GET, POST, or both. This is useful for getting a list of all registered routes on your frontend.

Example `router.stack` object:

```javascript
{
"/": {
"get": true
},
"/about": {
"get": true
},
"/pageWithForm": {
"get": true,
"post": true
}
}
```

Sample app
===

Expand Down
Loading

0 comments on commit 028c7e0

Please sign in to comment.