{"action":"closed","number":147,"pull_request":{"url":"https://api.github.com/repos/zeit/next.js/pulls/147","id":91481469,"html_url":"https://github.com/zeit/next.js/pull/147","diff_url":"https://github.com/zeit/next.js/pull/147.diff","patch_url":"https://github.com/zeit/next.js/pull/147.patch","issue_url":"https://api.github.com/repos/zeit/next.js/issues/147","number":147,"state":"closed","locked":false,"title":"Parameterized routing with filesystem for #91","user":{"login":"nodegin","id":8536244,"avatar_url":"https://avatars.githubusercontent.com/u/8536244?v=3","gravatar_id":"","url":"https://api.github.com/users/nodegin","html_url":"https://github.com/nodegin","followers_url":"https://api.github.com/users/nodegin/followers","following_url":"https://api.github.com/users/nodegin/following{/other_user}","gists_url":"https://api.github.com/users/nodegin/gists{/gist_id}","starred_url":"https://api.github.com/users/nodegin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodegin/subscriptions","organizations_url":"https://api.github.com/users/nodegin/orgs","repos_url":"https://api.github.com/users/nodegin/repos","events_url":"https://api.github.com/users/nodegin/events{/privacy}","received_events_url":"https://api.github.com/users/nodegin/received_events","type":"User","site_admin":false},"body":"Hello, here is a proof of concept pull request for issue #91 that achieves parameterized routing using only filesystem structure.\n\n**Filesystem**\n\n![2016-10-29 15 00 59](https://cloud.githubusercontent.com/assets/8536244/19827855/b9bd890e-9de8-11e6-8ba1-94eba1075718.png)\n\n**Code**\n\n``` js\nimport React from 'react'\n\nexport default class extends React.Component {\n  static async getInitialProps ({ req, params }) {\n    // params property must matches filename\n    return { test: params.id }\n  }\n\n  render () {\n    return (\n      <b>{ this.props.test }</b>\n    )\n  }\n}\n```\n\n**Result**\n\n![2016-10-29 14 58 14](https://cloud.githubusercontent.com/assets/8536244/19827833/321bc3da-9de8-11e6-87f1-44273b562eff.png)\n![2016-10-29 14 58 02](https://cloud.githubusercontent.com/assets/8536244/19827834/32260052-9de8-11e6-88ce-708c9a2885d3.png)\n![2016-10-29 14 57 48](https://cloud.githubusercontent.com/assets/8536244/19827835/32266722-9de8-11e6-8e99-d3faeb0d6ce6.png)\n![2016-10-29 14 58 25](https://cloud.githubusercontent.com/assets/8536244/19827836/32280c8a-9de8-11e6-8719-d1369cc20e99.png)\n","created_at":"2016-10-29T07:04:42Z","updated_at":"2016-11-16T09:59:49Z","closed_at":"2016-11-16T09:59:49Z","merged_at":null,"merge_commit_sha":"48e893e2d721a303cd75b943c53154f12454cc4f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zeit/next.js/pulls/147/commits","review_comments_url":"https://api.github.com/repos/zeit/next.js/pulls/147/comments","review_comment_url":"https://api.github.com/repos/zeit/next.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zeit/next.js/issues/147/comments","statuses_url":"https://api.github.com/repos/zeit/next.js/statuses/9a0ddf9c4867a5a50addc5176c0e449a5fd1d71a","head":{"label":"nodegin:master","ref":"master","sha":"9a0ddf9c4867a5a50addc5176c0e449a5fd1d71a","user":{"login":"nodegin","id":8536244,"avatar_url":"https://avatars.githubusercontent.com/u/8536244?v=3","gravatar_id":"","url":"https://api.github.com/users/nodegin","html_url":"https://github.com/nodegin","followers_url":"https://api.github.com/users/nodegin/followers","following_url":"https://api.github.com/users/nodegin/following{/other_user}","gists_url":"https://api.github.com/users/nodegin/gists{/gist_id}","starred_url":"https://api.github.com/users/nodegin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodegin/subscriptions","organizations_url":"https://api.github.com/users/nodegin/orgs","repos_url":"https://api.github.com/users/nodegin/repos","events_url":"https://api.github.com/users/nodegin/events{/privacy}","received_events_url":"https://api.github.com/users/nodegin/received_events","type":"User","site_admin":false},"repo":{"id":72264042,"name":"next.js","full_name":"nodegin/next.js","owner":{"login":"nodegin","id":8536244,"avatar_url":"https://avatars.githubusercontent.com/u/8536244?v=3","gravatar_id":"","url":"https://api.github.com/users/nodegin","html_url":"https://github.com/nodegin","followers_url":"https://api.github.com/users/nodegin/followers","following_url":"https://api.github.com/users/nodegin/following{/other_user}","gists_url":"https://api.github.com/users/nodegin/gists{/gist_id}","starred_url":"https://api.github.com/users/nodegin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodegin/subscriptions","organizations_url":"https://api.github.com/users/nodegin/orgs","repos_url":"https://api.github.com/users/nodegin/repos","events_url":"https://api.github.com/users/nodegin/events{/privacy}","received_events_url":"https://api.github.com/users/nodegin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nodegin/next.js","description":"A minimalistic framework for server-rendered React applications","fork":true,"url":"https://api.github.com/repos/nodegin/next.js","forks_url":"https://api.github.com/repos/nodegin/next.js/forks","keys_url":"https://api.github.com/repos/nodegin/next.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodegin/next.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodegin/next.js/teams","hooks_url":"https://api.github.com/repos/nodegin/next.js/hooks","issue_events_url":"https://api.github.com/repos/nodegin/next.js/issues/events{/number}","events_url":"https://api.github.com/repos/nodegin/next.js/events","assignees_url":"https://api.github.com/repos/nodegin/next.js/assignees{/user}","branches_url":"https://api.github.com/repos/nodegin/next.js/branches{/branch}","tags_url":"https://api.github.com/repos/nodegin/next.js/tags","blobs_url":"https://api.github.com/repos/nodegin/next.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodegin/next.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodegin/next.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodegin/next.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodegin/next.js/statuses/{sha}","languages_url":"https://api.github.com/repos/nodegin/next.js/languages","stargazers_url":"https://api.github.com/repos/nodegin/next.js/stargazers","contributors_url":"https://api.github.com/repos/nodegin/next.js/contributors","subscribers_url":"https://api.github.com/repos/nodegin/next.js/subscribers","subscription_url":"https://api.github.com/repos/nodegin/next.js/subscription","commits_url":"https://api.github.com/repos/nodegin/next.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodegin/next.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodegin/next.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodegin/next.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodegin/next.js/contents/{+path}","compare_url":"https://api.github.com/repos/nodegin/next.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodegin/next.js/merges","archive_url":"https://api.github.com/repos/nodegin/next.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodegin/next.js/downloads","issues_url":"https://api.github.com/repos/nodegin/next.js/issues{/number}","pulls_url":"https://api.github.com/repos/nodegin/next.js/pulls{/number}","milestones_url":"https://api.github.com/repos/nodegin/next.js/milestones{/number}","notifications_url":"https://api.github.com/repos/nodegin/next.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodegin/next.js/labels{/name}","releases_url":"https://api.github.com/repos/nodegin/next.js/releases{/id}","deployments_url":"https://api.github.com/repos/nodegin/next.js/deployments","created_at":"2016-10-29T04:03:43Z","updated_at":"2016-10-29T04:03:44Z","pushed_at":"2016-11-01T20:45:37Z","git_url":"git://github.com/nodegin/next.js.git","ssh_url":"git@github.com:nodegin/next.js.git","clone_url":"https://github.com/nodegin/next.js.git","svn_url":"https://github.com/nodegin/next.js","homepage":"https://zeit.co/blog/next","size":163,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zeit:master","ref":"master","sha":"c3ae04b69a9ceffaad92cd9246caac38149d16be","user":{"login":"zeit","id":14985020,"avatar_url":"https://avatars.githubusercontent.com/u/14985020?v=3","gravatar_id":"","url":"https://api.github.com/users/zeit","html_url":"https://github.com/zeit","followers_url":"https://api.github.com/users/zeit/followers","following_url":"https://api.github.com/users/zeit/following{/other_user}","gists_url":"https://api.github.com/users/zeit/gists{/gist_id}","starred_url":"https://api.github.com/users/zeit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeit/subscriptions","organizations_url":"https://api.github.com/users/zeit/orgs","repos_url":"https://api.github.com/users/zeit/repos","events_url":"https://api.github.com/users/zeit/events{/privacy}","received_events_url":"https://api.github.com/users/zeit/received_events","type":"Organization","site_admin":false},"repo":{"id":70107786,"name":"next.js","full_name":"zeit/next.js","owner":{"login":"zeit","id":14985020,"avatar_url":"https://avatars.githubusercontent.com/u/14985020?v=3","gravatar_id":"","url":"https://api.github.com/users/zeit","html_url":"https://github.com/zeit","followers_url":"https://api.github.com/users/zeit/followers","following_url":"https://api.github.com/users/zeit/following{/other_user}","gists_url":"https://api.github.com/users/zeit/gists{/gist_id}","starred_url":"https://api.github.com/users/zeit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeit/subscriptions","organizations_url":"https://api.github.com/users/zeit/orgs","repos_url":"https://api.github.com/users/zeit/repos","events_url":"https://api.github.com/users/zeit/events{/privacy}","received_events_url":"https://api.github.com/users/zeit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zeit/next.js","description":"A minimalistic framework for universal server-rendered React applications","fork":false,"url":"https://api.github.com/repos/zeit/next.js","forks_url":"https://api.github.com/repos/zeit/next.js/forks","keys_url":"https://api.github.com/repos/zeit/next.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zeit/next.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zeit/next.js/teams","hooks_url":"https://api.github.com/repos/zeit/next.js/hooks","issue_events_url":"https://api.github.com/repos/zeit/next.js/issues/events{/number}","events_url":"https://api.github.com/repos/zeit/next.js/events","assignees_url":"https://api.github.com/repos/zeit/next.js/assignees{/user}","branches_url":"https://api.github.com/repos/zeit/next.js/branches{/branch}","tags_url":"https://api.github.com/repos/zeit/next.js/tags","blobs_url":"https://api.github.com/repos/zeit/next.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zeit/next.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zeit/next.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/zeit/next.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zeit/next.js/statuses/{sha}","languages_url":"https://api.github.com/repos/zeit/next.js/languages","stargazers_url":"https://api.github.com/repos/zeit/next.js/stargazers","contributors_url":"https://api.github.com/repos/zeit/next.js/contributors","subscribers_url":"https://api.github.com/repos/zeit/next.js/subscribers","subscription_url":"https://api.github.com/repos/zeit/next.js/subscription","commits_url":"https://api.github.com/repos/zeit/next.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/zeit/next.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/zeit/next.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/zeit/next.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/zeit/next.js/contents/{+path}","compare_url":"https://api.github.com/repos/zeit/next.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zeit/next.js/merges","archive_url":"https://api.github.com/repos/zeit/next.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zeit/next.js/downloads","issues_url":"https://api.github.com/repos/zeit/next.js/issues{/number}","pulls_url":"https://api.github.com/repos/zeit/next.js/pulls{/number}","milestones_url":"https://api.github.com/repos/zeit/next.js/milestones{/number}","notifications_url":"https://api.github.com/repos/zeit/next.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zeit/next.js/labels{/name}","releases_url":"https://api.github.com/repos/zeit/next.js/releases{/id}","deployments_url":"https://api.github.com/repos/zeit/next.js/deployments","created_at":"2016-10-05T23:32:51Z","updated_at":"2016-11-16T09:48:16Z","pushed_at":"2016-11-16T07:04:57Z","git_url":"git://github.com/zeit/next.js.git","ssh_url":"git@github.com:zeit/next.js.git","clone_url":"https://github.com/zeit/next.js.git","svn_url":"https://github.com/zeit/next.js","homepage":"https://zeit.co/blog/next","size":303,"stargazers_count":5801,"watchers_count":5801,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":203,"mirror_url":null,"open_issues_count":94,"forks":203,"open_issues":94,"watchers":5801,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zeit/next.js/pulls/147"},"html":{"href":"https://github.com/zeit/next.js/pull/147"},"issue":{"href":"https://api.github.com/repos/zeit/next.js/issues/147"},"comments":{"href":"https://api.github.com/repos/zeit/next.js/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/zeit/next.js/pulls/147/comments"},"review_comment":{"href":"https://api.github.com/repos/zeit/next.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zeit/next.js/pulls/147/commits"},"statuses":{"href":"https://api.github.com/repos/zeit/next.js/statuses/9a0ddf9c4867a5a50addc5176c0e449a5fd1d71a"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":30,"review_comments":0,"commits":9,"additions":146,"deletions":49,"changed_files":7}}
{"actor":{"display_login":"nodegin"}}