Skip to content

Releases: benhurdavies/magic-router

magic-router v1.1.3

28 Dec 10:35
Compare
Choose a tag to compare

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

12 Dec 10:59
Compare
Choose a tag to compare
  • if an action/method name in controller file have the name of index or get (default index routing) it have default routing as Hostname/controller too. if a controller have multiple default index routing names as action/method name in a file this feature will not work.

magic-router v1.1.1

05 Dec 05:41
1fc8263
Compare
Choose a tag to compare

1.1.1 : Add global Prefix for routing.

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

29 Nov 08:01
5c00c9a
Compare
Choose a tag to compare

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

28 Nov 10:45
5821c94
Compare
Choose a tag to compare

1.0.8 : Exclude controller files

  • Feature to exclude some controller files from magic-routering.
  • Logging the router details.