{"action":"created","issue":{"url":"https://api.github.com/repos/trailsjs/trails/issues/89","labels_url":"https://api.github.com/repos/trailsjs/trails/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/trailsjs/trails/issues/89/comments","events_url":"https://api.github.com/repos/trailsjs/trails/issues/89/events","html_url":"https://github.com/trailsjs/trails/issues/89","id":127115771,"number":89,"title":"standardized controller/policies API","user":{"login":"jaumard","id":2970449,"avatar_url":"https://avatars.githubusercontent.com/u/2970449?v=3","gravatar_id":"","url":"https://api.github.com/users/jaumard","html_url":"https://github.com/jaumard","followers_url":"https://api.github.com/users/jaumard/followers","following_url":"https://api.github.com/users/jaumard/following{/other_user}","gists_url":"https://api.github.com/users/jaumard/gists{/gist_id}","starred_url":"https://api.github.com/users/jaumard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaumard/subscriptions","organizations_url":"https://api.github.com/users/jaumard/orgs","repos_url":"https://api.github.com/users/jaumard/repos","events_url":"https://api.github.com/users/jaumard/events{/privacy}","received_events_url":"https://api.github.com/users/jaumard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/trailsjs/trails/labels/discussion","name":"discussion","color":"964b00"},{"url":"https://api.github.com/repos/trailsjs/trails/labels/task","name":"task","color":"333333"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-17T18:57:52Z","updated_at":"2016-01-31T09:19:32Z","closed_at":null,"body":"In order to make all Trailpacks compatible whatever the web server choice, we need a unified API for controllers and policies.\r\n```\r\nmodule.exports = class MyController extends Controller{\r\n  /**\r\n    * params : url parameters\r\n    * query : get parameters\r\n    * body : payload\r\n  **/\r\n  info(params, query, body, next){\r\n    next(null, {status: 200, data: {whatever:'ok’}, headers:[]})\r\n  } \r\n}\r\n```  \r\nBut actually controllers/policies are bind directly to web server so I don't see how we can implement this :/.\r\nAny idea ?"},"comment":{"url":"https://api.github.com/repos/trailsjs/trails/issues/comments/177447140","html_url":"https://github.com/trailsjs/trails/issues/89#issuecomment-177447140","issue_url":"https://api.github.com/repos/trailsjs/trails/issues/89","id":177447140,"user":{"login":"jaumard","id":2970449,"avatar_url":"https://avatars.githubusercontent.com/u/2970449?v=3","gravatar_id":"","url":"https://api.github.com/users/jaumard","html_url":"https://github.com/jaumard","followers_url":"https://api.github.com/users/jaumard/followers","following_url":"https://api.github.com/users/jaumard/following{/other_user}","gists_url":"https://api.github.com/users/jaumard/gists{/gist_id}","starred_url":"https://api.github.com/users/jaumard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaumard/subscriptions","organizations_url":"https://api.github.com/users/jaumard/orgs","repos_url":"https://api.github.com/users/jaumard/repos","events_url":"https://api.github.com/users/jaumard/events{/privacy}","received_events_url":"https://api.github.com/users/jaumard/received_events","type":"User","site_admin":false},"created_at":"2016-01-31T09:19:32Z","updated_at":"2016-01-31T09:19:32Z","body":"Ok cool let's go on this ! :D we will be hapi to trust it ;) lol \r\nI will need you for some spec with express4 when you have some time. About configuration and all middleware things. "}}