Releases: benhurdavies/magic-router
Releases · benhurdavies/magic-router
magic-router v1.1.3
Controller Name logic change
- If a controller file have multiple modules exported, it choose controller name as module export name.
magic-router v1.1.2
- if an action/method name in controller file have the name of
index
orget
(default index routing) it have default routing asHostname/controller
too. if a controller have multipledefault index routing
names as action/method name in a file this feature will not work.
magic-router v1.1.1
1.1.1 : Add global Prefix for routing.
- Adding global prefix for routing in magic-router. Usage example from test
Initializing Opitons
let options = {
dirPath:'./controllers', // path of controller directory
exclude:[], // optional files path for removing from magic-routering
prefix:'', // global prefix for routing => added in 1.1.1 releases
};
magicRouter.addAll(app, options);
magic-router v1.0.9
1.0.9 : Default index router
- Automatically/default add router for "index" action. eg: invoke index method in controller by
`${host}/${controllerName}`
`${host}/${controllerName}/${index}`
magic-router v1.0.8
1.0.8 : Exclude controller files
- Feature to exclude some controller files from magic-routering.
- Logging the router details.