{"action":"created","comment":{"url":"https://api.github.com/repos/trailsjs/trails-docs/pulls/comments/61909841","id":61909841,"diff_hunk":"@@ -0,0 +1,45 @@\n+# Routes\n+\n+\n+\n+## What is a Route\n+\n+### Introduction\n+A route is the functionality that implement the possibility to distinguish on URL from an another.\n+Like all web frameworks, Trails route provide the mechanism that map route to controllers.\n+\n+## How to use it in Trails\n+\n+#### 1 - Configuration\n+\n+##### The common way\n+\n+```JavaScript\n+// config/routes.js\n+module.exports = [\n+  {\n+    method: [ 'GET' ],\n+    path: '/example/test',\n+    handler: 'ExampleController.test'\n+  }\n+]\n+```\n+> method: can be ['POST', 'GET', 'PUT', 'DELETE']","path":"concepts/routing/README.md","position":27,"original_position":27,"commit_id":"d179a9c1323e906b99711ef669cb93add5427142","original_commit_id":"d179a9c1323e906b99711ef669cb93add5427142","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},"body":"There (at least) also patch, head, option","created_at":"2016-05-03T16:15:53Z","updated_at":"2016-05-03T16:15:53Z","html_url":"https://github.com/trailsjs/trails-docs/pull/7#discussion_r61909841","pull_request_url":"https://api.github.com/repos/trailsjs/trails-docs/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/trailsjs/trails-docs/pulls/comments/61909841"},"html":{"href":"https://github.com/trailsjs/trails-docs/pull/7#discussion_r61909841"},"pull_request":{"href":"https://api.github.com/repos/trailsjs/trails-docs/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/trailsjs/trails-docs/pulls/7","id":68717648,"html_url":"https://github.com/trailsjs/trails-docs/pull/7","diff_url":"https://github.com/trailsjs/trails-docs/pull/7.diff","patch_url":"https://github.com/trailsjs/trails-docs/pull/7.patch","issue_url":"https://api.github.com/repos/trailsjs/trails-docs/issues/7","number":7,"state":"open","locked":false,"title":"Feature : concept / routing","user":{"login":"maissani","id":1372756,"avatar_url":"https://avatars.githubusercontent.com/u/1372756?v=3","gravatar_id":"","url":"https://api.github.com/users/maissani","html_url":"https://github.com/maissani","followers_url":"https://api.github.com/users/maissani/followers","following_url":"https://api.github.com/users/maissani/following{/other_user}","gists_url":"https://api.github.com/users/maissani/gists{/gist_id}","starred_url":"https://api.github.com/users/maissani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maissani/subscriptions","organizations_url":"https://api.github.com/users/maissani/orgs","repos_url":"https://api.github.com/users/maissani/repos","events_url":"https://api.github.com/users/maissani/events{/privacy}","received_events_url":"https://api.github.com/users/maissani/received_events","type":"User","site_admin":false},"body":"# Before validation\r\n\r\n- [X] Default route\r\n- [X] Before Accessing Controller\r\n- [ ] SLUG routes ?\r\n\r\nNeed to be discuss and approbate by maintainers.","created_at":"2016-05-03T14:46:53Z","updated_at":"2016-05-03T16:15:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e003fac98cbc42edbbcc7ac854340132274d0adf","assignee":{"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},"milestone":{"url":"https://api.github.com/repos/trailsjs/trails-docs/milestones/1","html_url":"https://github.com/trailsjs/trails-docs/milestones/v1.0","labels_url":"https://api.github.com/repos/trailsjs/trails-docs/milestones/1/labels","id":1703748,"number":1,"title":"v1.0","description":"","creator":{"login":"maissani","id":1372756,"avatar_url":"https://avatars.githubusercontent.com/u/1372756?v=3","gravatar_id":"","url":"https://api.github.com/users/maissani","html_url":"https://github.com/maissani","followers_url":"https://api.github.com/users/maissani/followers","following_url":"https://api.github.com/users/maissani/following{/other_user}","gists_url":"https://api.github.com/users/maissani/gists{/gist_id}","starred_url":"https://api.github.com/users/maissani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maissani/subscriptions","organizations_url":"https://api.github.com/users/maissani/orgs","repos_url":"https://api.github.com/users/maissani/repos","events_url":"https://api.github.com/users/maissani/events{/privacy}","received_events_url":"https://api.github.com/users/maissani/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-04-13T13:27:16Z","updated_at":"2016-05-03T14:47:46Z","due_on":"2016-04-28T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/trailsjs/trails-docs/pulls/7/commits","review_comments_url":"https://api.github.com/repos/trailsjs/trails-docs/pulls/7/comments","review_comment_url":"https://api.github.com/repos/trailsjs/trails-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/trailsjs/trails-docs/issues/7/comments","statuses_url":"https://api.github.com/repos/trailsjs/trails-docs/statuses/d179a9c1323e906b99711ef669cb93add5427142","head":{"label":"maissani:feat/concept/routing","ref":"feat/concept/routing","sha":"d179a9c1323e906b99711ef669cb93add5427142","user":{"login":"maissani","id":1372756,"avatar_url":"https://avatars.githubusercontent.com/u/1372756?v=3","gravatar_id":"","url":"https://api.github.com/users/maissani","html_url":"https://github.com/maissani","followers_url":"https://api.github.com/users/maissani/followers","following_url":"https://api.github.com/users/maissani/following{/other_user}","gists_url":"https://api.github.com/users/maissani/gists{/gist_id}","starred_url":"https://api.github.com/users/maissani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maissani/subscriptions","organizations_url":"https://api.github.com/users/maissani/orgs","repos_url":"https://api.github.com/users/maissani/repos","events_url":"https://api.github.com/users/maissani/events{/privacy}","received_events_url":"https://api.github.com/users/maissani/received_events","type":"User","site_admin":false},"repo":{"id":50269125,"name":"trails-docs","full_name":"maissani/trails-docs","owner":{"login":"maissani","id":1372756,"avatar_url":"https://avatars.githubusercontent.com/u/1372756?v=3","gravatar_id":"","url":"https://api.github.com/users/maissani","html_url":"https://github.com/maissani","followers_url":"https://api.github.com/users/maissani/followers","following_url":"https://api.github.com/users/maissani/following{/other_user}","gists_url":"https://api.github.com/users/maissani/gists{/gist_id}","starred_url":"https://api.github.com/users/maissani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maissani/subscriptions","organizations_url":"https://api.github.com/users/maissani/orgs","repos_url":"https://api.github.com/users/maissani/repos","events_url":"https://api.github.com/users/maissani/events{/privacy}","received_events_url":"https://api.github.com/users/maissani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maissani/trails-docs","description":":books: Trails.js Documentation","fork":true,"url":"https://api.github.com/repos/maissani/trails-docs","forks_url":"https://api.github.com/repos/maissani/trails-docs/forks","keys_url":"https://api.github.com/repos/maissani/trails-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maissani/trails-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maissani/trails-docs/teams","hooks_url":"https://api.github.com/repos/maissani/trails-docs/hooks","issue_events_url":"https://api.github.com/repos/maissani/trails-docs/issues/events{/number}","events_url":"https://api.github.com/repos/maissani/trails-docs/events","assignees_url":"https://api.github.com/repos/maissani/trails-docs/assignees{/user}","branches_url":"https://api.github.com/repos/maissani/trails-docs/branches{/branch}","tags_url":"https://api.github.com/repos/maissani/trails-docs/tags","blobs_url":"https://api.github.com/repos/maissani/trails-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maissani/trails-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maissani/trails-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/maissani/trails-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maissani/trails-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/maissani/trails-docs/languages","stargazers_url":"https://api.github.com/repos/maissani/trails-docs/stargazers","contributors_url":"https://api.github.com/repos/maissani/trails-docs/contributors","subscribers_url":"https://api.github.com/repos/maissani/trails-docs/subscribers","subscription_url":"https://api.github.com/repos/maissani/trails-docs/subscription","commits_url":"https://api.github.com/repos/maissani/trails-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/maissani/trails-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/maissani/trails-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/maissani/trails-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/maissani/trails-docs/contents/{+path}","compare_url":"https://api.github.com/repos/maissani/trails-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maissani/trails-docs/merges","archive_url":"https://api.github.com/repos/maissani/trails-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maissani/trails-docs/downloads","issues_url":"https://api.github.com/repos/maissani/trails-docs/issues{/number}","pulls_url":"https://api.github.com/repos/maissani/trails-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/maissani/trails-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/maissani/trails-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maissani/trails-docs/labels{/name}","releases_url":"https://api.github.com/repos/maissani/trails-docs/releases{/id}","deployments_url":"https://api.github.com/repos/maissani/trails-docs/deployments","created_at":"2016-01-24T02:39:41Z","updated_at":"2016-02-05T21:48:54Z","pushed_at":"2016-05-03T14:40:22Z","git_url":"git://github.com/maissani/trails-docs.git","ssh_url":"git@github.com:maissani/trails-docs.git","clone_url":"https://github.com/maissani/trails-docs.git","svn_url":"https://github.com/maissani/trails-docs","homepage":"","size":692,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"trailsjs:master","ref":"master","sha":"7927aa1be9d09465b1a1622725b2f042629783ed","user":{"login":"trailsjs","id":15969634,"avatar_url":"https://avatars.githubusercontent.com/u/15969634?v=3","gravatar_id":"","url":"https://api.github.com/users/trailsjs","html_url":"https://github.com/trailsjs","followers_url":"https://api.github.com/users/trailsjs/followers","following_url":"https://api.github.com/users/trailsjs/following{/other_user}","gists_url":"https://api.github.com/users/trailsjs/gists{/gist_id}","starred_url":"https://api.github.com/users/trailsjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trailsjs/subscriptions","organizations_url":"https://api.github.com/users/trailsjs/orgs","repos_url":"https://api.github.com/users/trailsjs/repos","events_url":"https://api.github.com/users/trailsjs/events{/privacy}","received_events_url":"https://api.github.com/users/trailsjs/received_events","type":"Organization","site_admin":false},"repo":{"id":47080478,"name":"trails-docs","full_name":"trailsjs/trails-docs","owner":{"login":"trailsjs","id":15969634,"avatar_url":"https://avatars.githubusercontent.com/u/15969634?v=3","gravatar_id":"","url":"https://api.github.com/users/trailsjs","html_url":"https://github.com/trailsjs","followers_url":"https://api.github.com/users/trailsjs/followers","following_url":"https://api.github.com/users/trailsjs/following{/other_user}","gists_url":"https://api.github.com/users/trailsjs/gists{/gist_id}","starred_url":"https://api.github.com/users/trailsjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trailsjs/subscriptions","organizations_url":"https://api.github.com/users/trailsjs/orgs","repos_url":"https://api.github.com/users/trailsjs/repos","events_url":"https://api.github.com/users/trailsjs/events{/privacy}","received_events_url":"https://api.github.com/users/trailsjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trailsjs/trails-docs","description":":books: Trails.js Documentation","fork":false,"url":"https://api.github.com/repos/trailsjs/trails-docs","forks_url":"https://api.github.com/repos/trailsjs/trails-docs/forks","keys_url":"https://api.github.com/repos/trailsjs/trails-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trailsjs/trails-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trailsjs/trails-docs/teams","hooks_url":"https://api.github.com/repos/trailsjs/trails-docs/hooks","issue_events_url":"https://api.github.com/repos/trailsjs/trails-docs/issues/events{/number}","events_url":"https://api.github.com/repos/trailsjs/trails-docs/events","assignees_url":"https://api.github.com/repos/trailsjs/trails-docs/assignees{/user}","branches_url":"https://api.github.com/repos/trailsjs/trails-docs/branches{/branch}","tags_url":"https://api.github.com/repos/trailsjs/trails-docs/tags","blobs_url":"https://api.github.com/repos/trailsjs/trails-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trailsjs/trails-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trailsjs/trails-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/trailsjs/trails-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trailsjs/trails-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/trailsjs/trails-docs/languages","stargazers_url":"https://api.github.com/repos/trailsjs/trails-docs/stargazers","contributors_url":"https://api.github.com/repos/trailsjs/trails-docs/contributors","subscribers_url":"https://api.github.com/repos/trailsjs/trails-docs/subscribers","subscription_url":"https://api.github.com/repos/trailsjs/trails-docs/subscription","commits_url":"https://api.github.com/repos/trailsjs/trails-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/trailsjs/trails-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/trailsjs/trails-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/trailsjs/trails-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/trailsjs/trails-docs/contents/{+path}","compare_url":"https://api.github.com/repos/trailsjs/trails-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trailsjs/trails-docs/merges","archive_url":"https://api.github.com/repos/trailsjs/trails-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trailsjs/trails-docs/downloads","issues_url":"https://api.github.com/repos/trailsjs/trails-docs/issues{/number}","pulls_url":"https://api.github.com/repos/trailsjs/trails-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/trailsjs/trails-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/trailsjs/trails-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trailsjs/trails-docs/labels{/name}","releases_url":"https://api.github.com/repos/trailsjs/trails-docs/releases{/id}","deployments_url":"https://api.github.com/repos/trailsjs/trails-docs/deployments","created_at":"2015-11-29T21:11:49Z","updated_at":"2016-04-15T12:38:25Z","pushed_at":"2016-05-03T14:46:53Z","git_url":"git://github.com/trailsjs/trails-docs.git","ssh_url":"git@github.com:trailsjs/trails-docs.git","clone_url":"https://github.com/trailsjs/trails-docs.git","svn_url":"https://github.com/trailsjs/trails-docs","homepage":"","size":666,"stargazers_count":5,"watchers_count":5,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trailsjs/trails-docs/pulls/7"},"html":{"href":"https://github.com/trailsjs/trails-docs/pull/7"},"issue":{"href":"https://api.github.com/repos/trailsjs/trails-docs/issues/7"},"comments":{"href":"https://api.github.com/repos/trailsjs/trails-docs/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/trailsjs/trails-docs/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/trailsjs/trails-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/trailsjs/trails-docs/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/trailsjs/trails-docs/statuses/d179a9c1323e906b99711ef669cb93add5427142"}}}}