{"action":"created","comment":{"url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/comments/172024324","pull_request_review_id":100982510,"id":172024324,"diff_hunk":"@@ -1,3 +1,55 @@\n 'use strict';\n+let state = 10;\n+const http = require('http');\n+function handleRequest(request, response) {\n+    console.log('on request', request.url);\n+    switch (request.url) {\n+        case '/state':\n+            const stateUrl = 'http://localhost:8080/state';\n+            response.setHeader('Content-Type', 'text/html');\n+            response.write(`<br><strong> state is ${state} </strong><br>`);\n+            break;\n+\n+        case '/add':\n+            const addUrl = 'http://localhost:8080/add';\n+            state++;\n+            response.setHeader('Content-Type', 'text/html');\n+            response.write(`<h1>OK</h1>`);\n+            response.write(`<br><strong> state is  ${state} </strong><br>`);\n+            break;\n+\n+        case '/subtract':\n+            const subtractUrl = 'http://localhost:8080/subtract';\n+            state--;\n+            response.setHeader('Content-Type', 'text/html');\n+            response.write(`<h1>OK</h1>`);\n+            response.write(`<br><strong> state is  ${state} </strong><br>`);\n+            break;\n+\n+        case '/reset':\n+            const resetUrl = 'http://localhost:8080/reset';\n+            state = 10;\n+            response.setHeader('Content-Type', 'text/html');\n+            response.write(`<h1>OK</h1>`);\n+            response.write(`<br><strong> state is  ${state} </strong><br>`);\n+            break;\n+\n+        default:\n+            const badUrl = 'localhost:8080/bad';","path":"week1/homework/src/index.js","position":38,"original_position":38,"commit_id":"971d777b6101b6988495da09e8e6ab84f3d9a5eb","original_commit_id":"971d777b6101b6988495da09e8e6ab84f3d9a5eb","user":{"login":"GeorgeSapkin","id":5013206,"avatar_url":"https://avatars0.githubusercontent.com/u/5013206?v=4","gravatar_id":"","url":"https://api.github.com/users/GeorgeSapkin","html_url":"https://github.com/GeorgeSapkin","followers_url":"https://api.github.com/users/GeorgeSapkin/followers","following_url":"https://api.github.com/users/GeorgeSapkin/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeSapkin/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeSapkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeSapkin/subscriptions","organizations_url":"https://api.github.com/users/GeorgeSapkin/orgs","repos_url":"https://api.github.com/users/GeorgeSapkin/repos","events_url":"https://api.github.com/users/GeorgeSapkin/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeSapkin/received_events","type":"User","site_admin":false},"body":"This is an unused variable.","created_at":"2018-03-03T18:22:16Z","updated_at":"2018-03-03T18:24:01Z","html_url":"https://github.com/HackYourFuture/Node.js/pull/94#discussion_r172024324","pull_request_url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/94","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/comments/172024324"},"html":{"href":"https://github.com/HackYourFuture/Node.js/pull/94#discussion_r172024324"},"pull_request":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/94","id":172401055,"html_url":"https://github.com/HackYourFuture/Node.js/pull/94","diff_url":"https://github.com/HackYourFuture/Node.js/pull/94.diff","patch_url":"https://github.com/HackYourFuture/Node.js/pull/94.patch","issue_url":"https://api.github.com/repos/HackYourFuture/Node.js/issues/94","number":94,"state":"open","locked":false,"title":"Elmira's week1 nodejs HW","user":{"login":"elmira202003","id":33642240,"avatar_url":"https://avatars0.githubusercontent.com/u/33642240?v=4","gravatar_id":"","url":"https://api.github.com/users/elmira202003","html_url":"https://github.com/elmira202003","followers_url":"https://api.github.com/users/elmira202003/followers","following_url":"https://api.github.com/users/elmira202003/following{/other_user}","gists_url":"https://api.github.com/users/elmira202003/gists{/gist_id}","starred_url":"https://api.github.com/users/elmira202003/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmira202003/subscriptions","organizations_url":"https://api.github.com/users/elmira202003/orgs","repos_url":"https://api.github.com/users/elmira202003/repos","events_url":"https://api.github.com/users/elmira202003/events{/privacy}","received_events_url":"https://api.github.com/users/elmira202003/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-02T01:35:06Z","updated_at":"2018-03-03T18:24:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94fb7849ed8f3785620c392b28a73c1225520e90","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/94/commits","review_comments_url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/94/comments","review_comment_url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HackYourFuture/Node.js/issues/94/comments","statuses_url":"https://api.github.com/repos/HackYourFuture/Node.js/statuses/971d777b6101b6988495da09e8e6ab84f3d9a5eb","head":{"label":"elmira202003:elmira","ref":"elmira","sha":"971d777b6101b6988495da09e8e6ab84f3d9a5eb","user":{"login":"elmira202003","id":33642240,"avatar_url":"https://avatars0.githubusercontent.com/u/33642240?v=4","gravatar_id":"","url":"https://api.github.com/users/elmira202003","html_url":"https://github.com/elmira202003","followers_url":"https://api.github.com/users/elmira202003/followers","following_url":"https://api.github.com/users/elmira202003/following{/other_user}","gists_url":"https://api.github.com/users/elmira202003/gists{/gist_id}","starred_url":"https://api.github.com/users/elmira202003/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmira202003/subscriptions","organizations_url":"https://api.github.com/users/elmira202003/orgs","repos_url":"https://api.github.com/users/elmira202003/repos","events_url":"https://api.github.com/users/elmira202003/events{/privacy}","received_events_url":"https://api.github.com/users/elmira202003/received_events","type":"User","site_admin":false},"repo":{"id":123315917,"name":"Node.js","full_name":"elmira202003/Node.js","owner":{"login":"elmira202003","id":33642240,"avatar_url":"https://avatars0.githubusercontent.com/u/33642240?v=4","gravatar_id":"","url":"https://api.github.com/users/elmira202003","html_url":"https://github.com/elmira202003","followers_url":"https://api.github.com/users/elmira202003/followers","following_url":"https://api.github.com/users/elmira202003/following{/other_user}","gists_url":"https://api.github.com/users/elmira202003/gists{/gist_id}","starred_url":"https://api.github.com/users/elmira202003/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmira202003/subscriptions","organizations_url":"https://api.github.com/users/elmira202003/orgs","repos_url":"https://api.github.com/users/elmira202003/repos","events_url":"https://api.github.com/users/elmira202003/events{/privacy}","received_events_url":"https://api.github.com/users/elmira202003/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elmira202003/Node.js","description":"NodeJS 101 course","fork":true,"url":"https://api.github.com/repos/elmira202003/Node.js","forks_url":"https://api.github.com/repos/elmira202003/Node.js/forks","keys_url":"https://api.github.com/repos/elmira202003/Node.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elmira202003/Node.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elmira202003/Node.js/teams","hooks_url":"https://api.github.com/repos/elmira202003/Node.js/hooks","issue_events_url":"https://api.github.com/repos/elmira202003/Node.js/issues/events{/number}","events_url":"https://api.github.com/repos/elmira202003/Node.js/events","assignees_url":"https://api.github.com/repos/elmira202003/Node.js/assignees{/user}","branches_url":"https://api.github.com/repos/elmira202003/Node.js/branches{/branch}","tags_url":"https://api.github.com/repos/elmira202003/Node.js/tags","blobs_url":"https://api.github.com/repos/elmira202003/Node.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elmira202003/Node.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elmira202003/Node.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/elmira202003/Node.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elmira202003/Node.js/statuses/{sha}","languages_url":"https://api.github.com/repos/elmira202003/Node.js/languages","stargazers_url":"https://api.github.com/repos/elmira202003/Node.js/stargazers","contributors_url":"https://api.github.com/repos/elmira202003/Node.js/contributors","subscribers_url":"https://api.github.com/repos/elmira202003/Node.js/subscribers","subscription_url":"https://api.github.com/repos/elmira202003/Node.js/subscription","commits_url":"https://api.github.com/repos/elmira202003/Node.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/elmira202003/Node.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/elmira202003/Node.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/elmira202003/Node.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/elmira202003/Node.js/contents/{+path}","compare_url":"https://api.github.com/repos/elmira202003/Node.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elmira202003/Node.js/merges","archive_url":"https://api.github.com/repos/elmira202003/Node.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elmira202003/Node.js/downloads","issues_url":"https://api.github.com/repos/elmira202003/Node.js/issues{/number}","pulls_url":"https://api.github.com/repos/elmira202003/Node.js/pulls{/number}","milestones_url":"https://api.github.com/repos/elmira202003/Node.js/milestones{/number}","notifications_url":"https://api.github.com/repos/elmira202003/Node.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elmira202003/Node.js/labels{/name}","releases_url":"https://api.github.com/repos/elmira202003/Node.js/releases{/id}","deployments_url":"https://api.github.com/repos/elmira202003/Node.js/deployments","created_at":"2018-02-28T17:05:19Z","updated_at":"2018-02-28T17:05:21Z","pushed_at":"2018-03-02T01:33:02Z","git_url":"git://github.com/elmira202003/Node.js.git","ssh_url":"git@github.com:elmira202003/Node.js.git","clone_url":"https://github.com/elmira202003/Node.js.git","svn_url":"https://github.com/elmira202003/Node.js","homepage":null,"size":631,"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,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HackYourFuture:master","ref":"master","sha":"d5fd45a57a71ba5959734f29c361927ad35ba54d","user":{"login":"HackYourFuture","id":20858568,"avatar_url":"https://avatars2.githubusercontent.com/u/20858568?v=4","gravatar_id":"","url":"https://api.github.com/users/HackYourFuture","html_url":"https://github.com/HackYourFuture","followers_url":"https://api.github.com/users/HackYourFuture/followers","following_url":"https://api.github.com/users/HackYourFuture/following{/other_user}","gists_url":"https://api.github.com/users/HackYourFuture/gists{/gist_id}","starred_url":"https://api.github.com/users/HackYourFuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackYourFuture/subscriptions","organizations_url":"https://api.github.com/users/HackYourFuture/orgs","repos_url":"https://api.github.com/users/HackYourFuture/repos","events_url":"https://api.github.com/users/HackYourFuture/events{/privacy}","received_events_url":"https://api.github.com/users/HackYourFuture/received_events","type":"Organization","site_admin":false},"repo":{"id":68906713,"name":"Node.js","full_name":"HackYourFuture/Node.js","owner":{"login":"HackYourFuture","id":20858568,"avatar_url":"https://avatars2.githubusercontent.com/u/20858568?v=4","gravatar_id":"","url":"https://api.github.com/users/HackYourFuture","html_url":"https://github.com/HackYourFuture","followers_url":"https://api.github.com/users/HackYourFuture/followers","following_url":"https://api.github.com/users/HackYourFuture/following{/other_user}","gists_url":"https://api.github.com/users/HackYourFuture/gists{/gist_id}","starred_url":"https://api.github.com/users/HackYourFuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackYourFuture/subscriptions","organizations_url":"https://api.github.com/users/HackYourFuture/orgs","repos_url":"https://api.github.com/users/HackYourFuture/repos","events_url":"https://api.github.com/users/HackYourFuture/events{/privacy}","received_events_url":"https://api.github.com/users/HackYourFuture/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HackYourFuture/Node.js","description":"NodeJS 101 course","fork":false,"url":"https://api.github.com/repos/HackYourFuture/Node.js","forks_url":"https://api.github.com/repos/HackYourFuture/Node.js/forks","keys_url":"https://api.github.com/repos/HackYourFuture/Node.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HackYourFuture/Node.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HackYourFuture/Node.js/teams","hooks_url":"https://api.github.com/repos/HackYourFuture/Node.js/hooks","issue_events_url":"https://api.github.com/repos/HackYourFuture/Node.js/issues/events{/number}","events_url":"https://api.github.com/repos/HackYourFuture/Node.js/events","assignees_url":"https://api.github.com/repos/HackYourFuture/Node.js/assignees{/user}","branches_url":"https://api.github.com/repos/HackYourFuture/Node.js/branches{/branch}","tags_url":"https://api.github.com/repos/HackYourFuture/Node.js/tags","blobs_url":"https://api.github.com/repos/HackYourFuture/Node.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HackYourFuture/Node.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HackYourFuture/Node.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/HackYourFuture/Node.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HackYourFuture/Node.js/statuses/{sha}","languages_url":"https://api.github.com/repos/HackYourFuture/Node.js/languages","stargazers_url":"https://api.github.com/repos/HackYourFuture/Node.js/stargazers","contributors_url":"https://api.github.com/repos/HackYourFuture/Node.js/contributors","subscribers_url":"https://api.github.com/repos/HackYourFuture/Node.js/subscribers","subscription_url":"https://api.github.com/repos/HackYourFuture/Node.js/subscription","commits_url":"https://api.github.com/repos/HackYourFuture/Node.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/HackYourFuture/Node.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/HackYourFuture/Node.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/HackYourFuture/Node.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/HackYourFuture/Node.js/contents/{+path}","compare_url":"https://api.github.com/repos/HackYourFuture/Node.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HackYourFuture/Node.js/merges","archive_url":"https://api.github.com/repos/HackYourFuture/Node.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HackYourFuture/Node.js/downloads","issues_url":"https://api.github.com/repos/HackYourFuture/Node.js/issues{/number}","pulls_url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls{/number}","milestones_url":"https://api.github.com/repos/HackYourFuture/Node.js/milestones{/number}","notifications_url":"https://api.github.com/repos/HackYourFuture/Node.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HackYourFuture/Node.js/labels{/name}","releases_url":"https://api.github.com/repos/HackYourFuture/Node.js/releases{/id}","deployments_url":"https://api.github.com/repos/HackYourFuture/Node.js/deployments","created_at":"2016-09-22T09:36:44Z","updated_at":"2018-03-02T07:23:21Z","pushed_at":"2018-03-03T17:25:38Z","git_url":"git://github.com/HackYourFuture/Node.js.git","ssh_url":"git@github.com:HackYourFuture/Node.js.git","clone_url":"https://github.com/HackYourFuture/Node.js.git","svn_url":"https://github.com/HackYourFuture/Node.js","homepage":null,"size":635,"stargazers_count":21,"watchers_count":21,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":90,"mirror_url":null,"archived":false,"open_issues_count":12,"license":null,"forks":90,"open_issues":12,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/94"},"html":{"href":"https://github.com/HackYourFuture/Node.js/pull/94"},"issue":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/issues/94"},"comments":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/statuses/971d777b6101b6988495da09e8e6ab84f3d9a5eb"}},"author_association":"NONE"}}
{"actor":{"display_login":"GeorgeSapkin"}}