{"action":"created","comment":{"url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/comments/149925233","pull_request_review_id":75392965,"id":149925233,"diff_hunk":"@@ -1,5 +1,57 @@\n-const express = require('express');\n+const express = require(\"express\");\n+const expressLayouts = require(\"express-ejs-layouts\");\n const app = express();\n-const Chuck  = require('chucknorris-io');\n+const Chuck = require(\"chucknorris-io\");\n const client = new Chuck();\n \n+app.use(expressLayouts);\n+app.set(\"layout\", \"layouts/main-layout\");\n+\n+app.set(\"views\", __dirname + \"/views\");\n+app.set(\"view engine\", \"ejs\");\n+\n+app.use(express.static(\"public\"));\n+\n+app.get(\"/random\", (req, res, next) => {\n+  client\n+    .getRandomJoke()\n+    .then(result => {\n+      const data = {\n+        joke: result\n+      };\n+      res.render(\"random\", data);\n+    })\n+    .catch(err => {\n+      throw err;\n+    });\n+});\n+\n+app.get(\"/random\", (req, res, next) => {\n+  client\n+    .getRandomJoke()\n+    .then(result => {\n+      const data = {\n+        joke: result\n+      };\n+      res.render(\"random\", data);\n+    })\n+    .catch(err => {\n+      throw err;\n+    });\n+});\n+\n+app.get(\"/categories\", (req, res, next) => {\n+  client\n+    .getJokeCategories()\n+    .then(result => {","path":"starter-code/app.js","position":48,"original_position":48,"commit_id":"3aaec5812de0e386c994c3cba9af4a4475a926d1","original_commit_id":"3aaec5812de0e386c994c3cba9af4a4475a926d1","user":{"login":"tawebbcn","id":26812171,"avatar_url":"https://avatars2.githubusercontent.com/u/26812171?v=4","gravatar_id":"","url":"https://api.github.com/users/tawebbcn","html_url":"https://github.com/tawebbcn","followers_url":"https://api.github.com/users/tawebbcn/followers","following_url":"https://api.github.com/users/tawebbcn/following{/other_user}","gists_url":"https://api.github.com/users/tawebbcn/gists{/gist_id}","starred_url":"https://api.github.com/users/tawebbcn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tawebbcn/subscriptions","organizations_url":"https://api.github.com/users/tawebbcn/orgs","repos_url":"https://api.github.com/users/tawebbcn/repos","events_url":"https://api.github.com/users/tawebbcn/events{/privacy}","received_events_url":"https://api.github.com/users/tawebbcn/received_events","type":"User","site_admin":false},"body":"Same as before, \"categories\" is a better name.","created_at":"2017-11-09T10:42:02Z","updated_at":"2017-11-09T10:42:47Z","html_url":"https://github.com/ironhack-labs/lab-express-chuck-norris/pull/142#discussion_r149925233","pull_request_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/142","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/comments/149925233"},"html":{"href":"https://github.com/ironhack-labs/lab-express-chuck-norris/pull/142#discussion_r149925233"},"pull_request":{"href":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/142"}}},"pull_request":{"url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/142","id":151589336,"html_url":"https://github.com/ironhack-labs/lab-express-chuck-norris/pull/142","diff_url":"https://github.com/ironhack-labs/lab-express-chuck-norris/pull/142.diff","patch_url":"https://github.com/ironhack-labs/lab-express-chuck-norris/pull/142.patch","issue_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/issues/142","number":142,"state":"open","locked":false,"title":"BCN - Juan & Jordi","user":{"login":"jcuadrad","id":31750689,"avatar_url":"https://avatars0.githubusercontent.com/u/31750689?v=4","gravatar_id":"","url":"https://api.github.com/users/jcuadrad","html_url":"https://github.com/jcuadrad","followers_url":"https://api.github.com/users/jcuadrad/followers","following_url":"https://api.github.com/users/jcuadrad/following{/other_user}","gists_url":"https://api.github.com/users/jcuadrad/gists{/gist_id}","starred_url":"https://api.github.com/users/jcuadrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcuadrad/subscriptions","organizations_url":"https://api.github.com/users/jcuadrad/orgs","repos_url":"https://api.github.com/users/jcuadrad/repos","events_url":"https://api.github.com/users/jcuadrad/events{/privacy}","received_events_url":"https://api.github.com/users/jcuadrad/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-09T08:37:34Z","updated_at":"2017-11-09T10:42:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1da6a5368907f707f6f72f1960cbc731ca28a6f","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/142/commits","review_comments_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/142/comments","review_comment_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/issues/142/comments","statuses_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/statuses/3aaec5812de0e386c994c3cba9af4a4475a926d1","head":{"label":"jcuadrad:master","ref":"master","sha":"3aaec5812de0e386c994c3cba9af4a4475a926d1","user":{"login":"jcuadrad","id":31750689,"avatar_url":"https://avatars0.githubusercontent.com/u/31750689?v=4","gravatar_id":"","url":"https://api.github.com/users/jcuadrad","html_url":"https://github.com/jcuadrad","followers_url":"https://api.github.com/users/jcuadrad/followers","following_url":"https://api.github.com/users/jcuadrad/following{/other_user}","gists_url":"https://api.github.com/users/jcuadrad/gists{/gist_id}","starred_url":"https://api.github.com/users/jcuadrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcuadrad/subscriptions","organizations_url":"https://api.github.com/users/jcuadrad/orgs","repos_url":"https://api.github.com/users/jcuadrad/repos","events_url":"https://api.github.com/users/jcuadrad/events{/privacy}","received_events_url":"https://api.github.com/users/jcuadrad/received_events","type":"User","site_admin":false},"repo":{"id":109996034,"name":"lab-express-chuck-norris","full_name":"jcuadrad/lab-express-chuck-norris","owner":{"login":"jcuadrad","id":31750689,"avatar_url":"https://avatars0.githubusercontent.com/u/31750689?v=4","gravatar_id":"","url":"https://api.github.com/users/jcuadrad","html_url":"https://github.com/jcuadrad","followers_url":"https://api.github.com/users/jcuadrad/followers","following_url":"https://api.github.com/users/jcuadrad/following{/other_user}","gists_url":"https://api.github.com/users/jcuadrad/gists{/gist_id}","starred_url":"https://api.github.com/users/jcuadrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcuadrad/subscriptions","organizations_url":"https://api.github.com/users/jcuadrad/orgs","repos_url":"https://api.github.com/users/jcuadrad/repos","events_url":"https://api.github.com/users/jcuadrad/events{/privacy}","received_events_url":"https://api.github.com/users/jcuadrad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jcuadrad/lab-express-chuck-norris","description":null,"fork":true,"url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris","forks_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/forks","keys_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/teams","hooks_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/hooks","issue_events_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/issues/events{/number}","events_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/events","assignees_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/assignees{/user}","branches_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/branches{/branch}","tags_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/tags","blobs_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/statuses/{sha}","languages_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/languages","stargazers_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/stargazers","contributors_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/contributors","subscribers_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/subscribers","subscription_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/subscription","commits_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/contents/{+path}","compare_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/merges","archive_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/downloads","issues_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/issues{/number}","pulls_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/pulls{/number}","milestones_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/milestones{/number}","notifications_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/labels{/name}","releases_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/releases{/id}","deployments_url":"https://api.github.com/repos/jcuadrad/lab-express-chuck-norris/deployments","created_at":"2017-11-08T15:47:34Z","updated_at":"2017-11-08T17:08:38Z","pushed_at":"2017-11-08T17:08:37Z","git_url":"git://github.com/jcuadrad/lab-express-chuck-norris.git","ssh_url":"git@github.com:jcuadrad/lab-express-chuck-norris.git","clone_url":"https://github.com/jcuadrad/lab-express-chuck-norris.git","svn_url":"https://github.com/jcuadrad/lab-express-chuck-norris","homepage":null,"size":10,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ironhack-labs:master","ref":"master","sha":"dc8c745f7c4205ef44cf8c09173d4e100ea50d58","user":{"login":"ironhack-labs","id":25032046,"avatar_url":"https://avatars3.githubusercontent.com/u/25032046?v=4","gravatar_id":"","url":"https://api.github.com/users/ironhack-labs","html_url":"https://github.com/ironhack-labs","followers_url":"https://api.github.com/users/ironhack-labs/followers","following_url":"https://api.github.com/users/ironhack-labs/following{/other_user}","gists_url":"https://api.github.com/users/ironhack-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/ironhack-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironhack-labs/subscriptions","organizations_url":"https://api.github.com/users/ironhack-labs/orgs","repos_url":"https://api.github.com/users/ironhack-labs/repos","events_url":"https://api.github.com/users/ironhack-labs/events{/privacy}","received_events_url":"https://api.github.com/users/ironhack-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":80514818,"name":"lab-express-chuck-norris","full_name":"ironhack-labs/lab-express-chuck-norris","owner":{"login":"ironhack-labs","id":25032046,"avatar_url":"https://avatars3.githubusercontent.com/u/25032046?v=4","gravatar_id":"","url":"https://api.github.com/users/ironhack-labs","html_url":"https://github.com/ironhack-labs","followers_url":"https://api.github.com/users/ironhack-labs/followers","following_url":"https://api.github.com/users/ironhack-labs/following{/other_user}","gists_url":"https://api.github.com/users/ironhack-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/ironhack-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironhack-labs/subscriptions","organizations_url":"https://api.github.com/users/ironhack-labs/orgs","repos_url":"https://api.github.com/users/ironhack-labs/repos","events_url":"https://api.github.com/users/ironhack-labs/events{/privacy}","received_events_url":"https://api.github.com/users/ironhack-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ironhack-labs/lab-express-chuck-norris","description":null,"fork":false,"url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris","forks_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/forks","keys_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/teams","hooks_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/hooks","issue_events_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/issues/events{/number}","events_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/events","assignees_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/assignees{/user}","branches_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/branches{/branch}","tags_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/tags","blobs_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/git/refs{/sha}","trees_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/statuses/{sha}","languages_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/languages","stargazers_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/stargazers","contributors_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/contributors","subscribers_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/subscribers","subscription_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/subscription","commits_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/commits{/sha}","git_commits_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/git/commits{/sha}","comments_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/comments{/number}","issue_comment_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/issues/comments{/number}","contents_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/contents/{+path}","compare_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/merges","archive_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/downloads","issues_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/issues{/number}","pulls_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls{/number}","milestones_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/milestones{/number}","notifications_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/labels{/name}","releases_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/releases{/id}","deployments_url":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/deployments","created_at":"2017-01-31T11:33:37Z","updated_at":"2017-01-31T11:34:08Z","pushed_at":"2017-11-09T08:37:34Z","git_url":"git://github.com/ironhack-labs/lab-express-chuck-norris.git","ssh_url":"git@github.com:ironhack-labs/lab-express-chuck-norris.git","clone_url":"https://github.com/ironhack-labs/lab-express-chuck-norris.git","svn_url":"https://github.com/ironhack-labs/lab-express-chuck-norris","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":256,"mirror_url":null,"archived":false,"open_issues_count":19,"forks":256,"open_issues":19,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/142"},"html":{"href":"https://github.com/ironhack-labs/lab-express-chuck-norris/pull/142"},"issue":{"href":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/issues/142"},"comments":{"href":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/issues/142/comments"},"review_comments":{"href":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/142/comments"},"review_comment":{"href":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/pulls/142/commits"},"statuses":{"href":"https://api.github.com/repos/ironhack-labs/lab-express-chuck-norris/statuses/3aaec5812de0e386c994c3cba9af4a4475a926d1"}},"author_association":"NONE"}}
{"actor":{"display_login":"tawebbcn"}}