Skip to content

Commit

Permalink
read me update
Browse files Browse the repository at this point in the history
  • Loading branch information
benhurdavies committed Dec 12, 2017
1 parent fcd69ff commit f2c5d18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install --save magic-router
All the controllers in the controller folder are loaded and the default routes are configured automatically by the magic-router.

* The default router will be : Hostname/controller(controller filename without extension)/action(method name)
* if the action/method name in controller file have the name of `index` or `get` (default index routing) it have default as Hostname/controller too. if a controller have multiple `default index routing` action/method name in a file this feature will not work
* 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.

From app.js

Expand Down Expand Up @@ -148,7 +148,7 @@ those only if you need to override the default behaviors.
* Adding global prefix for routing in magic-router. [Usage example from test](./test/example/prefixController.js)

#### 1.0.9 : Default index router
* Automatically/default add router for "index" action. eg: invoke index method in controller by
* Automatically/default add router for "index" or "get" action. eg: invoke index method in controller by
```javascript
`${host}/${controllerName}`
`${host}/${controllerName}/${index}`
Expand Down

0 comments on commit f2c5d18

Please sign in to comment.