-
Notifications
You must be signed in to change notification settings - Fork 1
Routing
tombert256 edited this page Jan 11, 2014
·
1 revision
Routing in Frameworkey is fairly unoriginal, and follows a 'METHOD /path':'Controller.Action'
Routes are defined in config/routes.js and should look something like this:
module.exports = {
'GET /':'Landing.home',
'POST /user':'User.login User.openProfile'
}
You may have noticed that /user had two actions defined for it. That is because Frameworkey allows any number of actions for a route that you'd like. This is quite handy for a login API, or a counter to see how many times someone has hit a certain page.
Upon doing a request, policies are checked on each action to enforce permissions.