Releases: barelyhuman/conrou
Releases · barelyhuman/conrou
Release list
v0.1.2-alpha.7
What's Changed
- Feat: allow getting routes from actions by @barelyhuman in #1
- Feat: register and use named middleware
- Feat: allow using normal req,res handlers as functions
Full Changelog: v0.1.2-alpha.4...v0.1.2-alpha.7
v0.1.2-alpha.4
Changes
- Added generation of url from controller bindings.
// file1.js
const router = createControllerBinder(mockRouter)
router.register(
class NamedController {
index(req) {
return req.params.id
}
}
)
router.get('/get/:id', 'NamedController.index')
// file2.js
const route = router.getRoute('NamedController.index', { id: 1 }) // => /get/1