Using an object to specify routes instead of JSON
- Dominant language
- JavaScript
- Stars
- 9
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
(h/t @des-des)
Might be nice to specify the standard routes (e.g `login`, `signup`, etc) with a handler object instead of in the JSON configuration file.
Fora usage example:
``` javascript
server.route({
method: 'GET',
path: '/login',
handler: {
form: {
email: { label: 'E-mail: ' },
password: { label: 'Password', confirm: true }
}
}
});
```
This can be implemented using the [`server.handler`](http://hapijs.com/api#serverhandlername-method) method.
This can then be specified inside the plugin instead of being part of the JSON, meaning we impose certain routes (which is fine; the user has required abase because they want a user system, right?), and the user has less JSON to worry about.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.