Skip to content

Commit

Permalink
update README with note about index support
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseditson committed Feb 10, 2017
1 parent f22ae79 commit 45b080b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,14 @@ module.exports.GET = async function(req, res) {
// or if you just want to avoid putting `:` in your file/folder names or something
module.exports.path = '/foo/bar'
```

**index routes**
```javascript
// routes/index.js
module.exports.GET = async function(req, res) {
return 'hello!'
}
// The above route would be reachable at / and /index.
// This works for deep paths (/thing/index.js maps to /thing and /thing/index)
// and even for params (/thing/:param/index.js maps to /thing/* and /thing/*/index).
```

0 comments on commit 45b080b

Please sign in to comment.