{"action":"created","comment":{"url":"https://api.github.com/repos/jphoenix86/real_time/pulls/comments/50042212","id":50042212,"diff_hunk":"@@ -0,0 +1,32 @@\n+const socket = io();\n+\n+const connectionCount = document.getElementById('connection-count');\n+const statusMessage = document.getElementById('status-message');\n+const buttons = document.querySelectorAll('#survey-choices button');\n+const countedVotes = document.getElementById('results');\n+const surveyId = document.getElementById('survey-id').innerText;\n+\n+socket.on('usersConnected', function (count) {\n+  connectionCount.innerText = count;\n+});\n+\n+socket.on('voteCount-' + surveyId.trim(), function (votes) {","path":"public/survey.js","position":13,"original_position":13,"commit_id":"84bada04e674e0e5e8b38f66df1d2cfbd1e8c163","original_commit_id":"84bada04e674e0e5e8b38f66df1d2cfbd1e8c163","user":{"login":"stevekinney","id":251000,"avatar_url":"https://avatars.githubusercontent.com/u/251000?v=3","gravatar_id":"","url":"https://api.github.com/users/stevekinney","html_url":"https://github.com/stevekinney","followers_url":"https://api.github.com/users/stevekinney/followers","following_url":"https://api.github.com/users/stevekinney/following{/other_user}","gists_url":"https://api.github.com/users/stevekinney/gists{/gist_id}","starred_url":"https://api.github.com/users/stevekinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevekinney/subscriptions","organizations_url":"https://api.github.com/users/stevekinney/orgs","repos_url":"https://api.github.com/users/stevekinney/repos","events_url":"https://api.github.com/users/stevekinney/events{/privacy}","received_events_url":"https://api.github.com/users/stevekinney/received_events","type":"User","site_admin":false},"body":"Repeated code is repeated.","created_at":"2016-01-18T20:44:05Z","updated_at":"2016-01-18T20:44:05Z","html_url":"https://github.com/jphoenix86/real_time/pull/8#discussion_r50042212","pull_request_url":"https://api.github.com/repos/jphoenix86/real_time/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/jphoenix86/real_time/pulls/comments/50042212"},"html":{"href":"https://github.com/jphoenix86/real_time/pull/8#discussion_r50042212"},"pull_request":{"href":"https://api.github.com/repos/jphoenix86/real_time/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/jphoenix86/real_time/pulls/8","id":56228998,"html_url":"https://github.com/jphoenix86/real_time/pull/8","diff_url":"https://github.com/jphoenix86/real_time/pull/8.diff","patch_url":"https://github.com/jphoenix86/real_time/pull/8.patch","issue_url":"https://api.github.com/repos/jphoenix86/real_time/issues/8","number":8,"state":"open","locked":false,"title":"7 add sockets server connects_to #7 ","user":{"login":"jphoenix86","id":8015081,"avatar_url":"https://avatars.githubusercontent.com/u/8015081?v=3","gravatar_id":"","url":"https://api.github.com/users/jphoenix86","html_url":"https://github.com/jphoenix86","followers_url":"https://api.github.com/users/jphoenix86/followers","following_url":"https://api.github.com/users/jphoenix86/following{/other_user}","gists_url":"https://api.github.com/users/jphoenix86/gists{/gist_id}","starred_url":"https://api.github.com/users/jphoenix86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphoenix86/subscriptions","organizations_url":"https://api.github.com/users/jphoenix86/orgs","repos_url":"https://api.github.com/users/jphoenix86/repos","events_url":"https://api.github.com/users/jphoenix86/events{/privacy}","received_events_url":"https://api.github.com/users/jphoenix86/received_events","type":"User","site_admin":false},"body":"@rrgayhart, @stevekinney, @applegrain\r\n\r\n#### What's this PR do?\r\n\r\nThis PR gives a user the ability to be able to go through create a survey (obviously its a little bit 1.0 ish).\r\nWhen a user now clicks create survey it should create a nested object which is the survey including the options they want. This should then redirect them directly to their admin panel where the buttons are the things they just entered.\r\n\r\n#### Where should the reviewer start?\r\n\r\nNavigate to: '/'\r\nGive your survey a name.\r\nClick the link to add fields until your survey is the desired length.\r\nClick create survey.\r\n\r\n#### How should this be manually tested?\r\n\r\nShould be as easy as:\r\n\r\nnpm install\r\nnpm start\r\nnavigate to root and try things out!\r\n\r\n#### Any background context you want to provide?\r\n\r\nAs a note to the above I have not yet implemented a DB or any way to maintain state over time. So if you leave a page and refresh it in the wrong way then you will lose the thing.\r\n\r\n#### What gif best describes this PR or how it makes you feel?\r\n\r\n![batman](http://i.giphy.com/26CalmkpfFU3io3yU.gif)","created_at":"2016-01-15T22:18:56Z","updated_at":"2016-01-18T20:44:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51b4199dc0873424fd3dd1c86f9e56f3c7f3741c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jphoenix86/real_time/pulls/8/commits","review_comments_url":"https://api.github.com/repos/jphoenix86/real_time/pulls/8/comments","review_comment_url":"https://api.github.com/repos/jphoenix86/real_time/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jphoenix86/real_time/issues/8/comments","statuses_url":"https://api.github.com/repos/jphoenix86/real_time/statuses/84bada04e674e0e5e8b38f66df1d2cfbd1e8c163","head":{"label":"jphoenix86:7-add-sockets-server","ref":"7-add-sockets-server","sha":"84bada04e674e0e5e8b38f66df1d2cfbd1e8c163","user":{"login":"jphoenix86","id":8015081,"avatar_url":"https://avatars.githubusercontent.com/u/8015081?v=3","gravatar_id":"","url":"https://api.github.com/users/jphoenix86","html_url":"https://github.com/jphoenix86","followers_url":"https://api.github.com/users/jphoenix86/followers","following_url":"https://api.github.com/users/jphoenix86/following{/other_user}","gists_url":"https://api.github.com/users/jphoenix86/gists{/gist_id}","starred_url":"https://api.github.com/users/jphoenix86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphoenix86/subscriptions","organizations_url":"https://api.github.com/users/jphoenix86/orgs","repos_url":"https://api.github.com/users/jphoenix86/repos","events_url":"https://api.github.com/users/jphoenix86/events{/privacy}","received_events_url":"https://api.github.com/users/jphoenix86/received_events","type":"User","site_admin":false},"repo":{"id":49527146,"name":"real_time","full_name":"jphoenix86/real_time","owner":{"login":"jphoenix86","id":8015081,"avatar_url":"https://avatars.githubusercontent.com/u/8015081?v=3","gravatar_id":"","url":"https://api.github.com/users/jphoenix86","html_url":"https://github.com/jphoenix86","followers_url":"https://api.github.com/users/jphoenix86/followers","following_url":"https://api.github.com/users/jphoenix86/following{/other_user}","gists_url":"https://api.github.com/users/jphoenix86/gists{/gist_id}","starred_url":"https://api.github.com/users/jphoenix86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphoenix86/subscriptions","organizations_url":"https://api.github.com/users/jphoenix86/orgs","repos_url":"https://api.github.com/users/jphoenix86/repos","events_url":"https://api.github.com/users/jphoenix86/events{/privacy}","received_events_url":"https://api.github.com/users/jphoenix86/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jphoenix86/real_time","description":null,"fork":false,"url":"https://api.github.com/repos/jphoenix86/real_time","forks_url":"https://api.github.com/repos/jphoenix86/real_time/forks","keys_url":"https://api.github.com/repos/jphoenix86/real_time/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jphoenix86/real_time/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jphoenix86/real_time/teams","hooks_url":"https://api.github.com/repos/jphoenix86/real_time/hooks","issue_events_url":"https://api.github.com/repos/jphoenix86/real_time/issues/events{/number}","events_url":"https://api.github.com/repos/jphoenix86/real_time/events","assignees_url":"https://api.github.com/repos/jphoenix86/real_time/assignees{/user}","branches_url":"https://api.github.com/repos/jphoenix86/real_time/branches{/branch}","tags_url":"https://api.github.com/repos/jphoenix86/real_time/tags","blobs_url":"https://api.github.com/repos/jphoenix86/real_time/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jphoenix86/real_time/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jphoenix86/real_time/git/refs{/sha}","trees_url":"https://api.github.com/repos/jphoenix86/real_time/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jphoenix86/real_time/statuses/{sha}","languages_url":"https://api.github.com/repos/jphoenix86/real_time/languages","stargazers_url":"https://api.github.com/repos/jphoenix86/real_time/stargazers","contributors_url":"https://api.github.com/repos/jphoenix86/real_time/contributors","subscribers_url":"https://api.github.com/repos/jphoenix86/real_time/subscribers","subscription_url":"https://api.github.com/repos/jphoenix86/real_time/subscription","commits_url":"https://api.github.com/repos/jphoenix86/real_time/commits{/sha}","git_commits_url":"https://api.github.com/repos/jphoenix86/real_time/git/commits{/sha}","comments_url":"https://api.github.com/repos/jphoenix86/real_time/comments{/number}","issue_comment_url":"https://api.github.com/repos/jphoenix86/real_time/issues/comments{/number}","contents_url":"https://api.github.com/repos/jphoenix86/real_time/contents/{+path}","compare_url":"https://api.github.com/repos/jphoenix86/real_time/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jphoenix86/real_time/merges","archive_url":"https://api.github.com/repos/jphoenix86/real_time/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jphoenix86/real_time/downloads","issues_url":"https://api.github.com/repos/jphoenix86/real_time/issues{/number}","pulls_url":"https://api.github.com/repos/jphoenix86/real_time/pulls{/number}","milestones_url":"https://api.github.com/repos/jphoenix86/real_time/milestones{/number}","notifications_url":"https://api.github.com/repos/jphoenix86/real_time/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jphoenix86/real_time/labels{/name}","releases_url":"https://api.github.com/repos/jphoenix86/real_time/releases{/id}","created_at":"2016-01-12T20:31:48Z","updated_at":"2016-01-13T19:53:17Z","pushed_at":"2016-01-18T01:06:53Z","git_url":"git://github.com/jphoenix86/real_time.git","ssh_url":"git@github.com:jphoenix86/real_time.git","clone_url":"https://github.com/jphoenix86/real_time.git","svn_url":"https://github.com/jphoenix86/real_time","homepage":null,"size":93,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"jphoenix86:master","ref":"master","sha":"05f5a81998d9658fe4b6c4174513fc6ad2708853","user":{"login":"jphoenix86","id":8015081,"avatar_url":"https://avatars.githubusercontent.com/u/8015081?v=3","gravatar_id":"","url":"https://api.github.com/users/jphoenix86","html_url":"https://github.com/jphoenix86","followers_url":"https://api.github.com/users/jphoenix86/followers","following_url":"https://api.github.com/users/jphoenix86/following{/other_user}","gists_url":"https://api.github.com/users/jphoenix86/gists{/gist_id}","starred_url":"https://api.github.com/users/jphoenix86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphoenix86/subscriptions","organizations_url":"https://api.github.com/users/jphoenix86/orgs","repos_url":"https://api.github.com/users/jphoenix86/repos","events_url":"https://api.github.com/users/jphoenix86/events{/privacy}","received_events_url":"https://api.github.com/users/jphoenix86/received_events","type":"User","site_admin":false},"repo":{"id":49527146,"name":"real_time","full_name":"jphoenix86/real_time","owner":{"login":"jphoenix86","id":8015081,"avatar_url":"https://avatars.githubusercontent.com/u/8015081?v=3","gravatar_id":"","url":"https://api.github.com/users/jphoenix86","html_url":"https://github.com/jphoenix86","followers_url":"https://api.github.com/users/jphoenix86/followers","following_url":"https://api.github.com/users/jphoenix86/following{/other_user}","gists_url":"https://api.github.com/users/jphoenix86/gists{/gist_id}","starred_url":"https://api.github.com/users/jphoenix86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphoenix86/subscriptions","organizations_url":"https://api.github.com/users/jphoenix86/orgs","repos_url":"https://api.github.com/users/jphoenix86/repos","events_url":"https://api.github.com/users/jphoenix86/events{/privacy}","received_events_url":"https://api.github.com/users/jphoenix86/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jphoenix86/real_time","description":null,"fork":false,"url":"https://api.github.com/repos/jphoenix86/real_time","forks_url":"https://api.github.com/repos/jphoenix86/real_time/forks","keys_url":"https://api.github.com/repos/jphoenix86/real_time/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jphoenix86/real_time/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jphoenix86/real_time/teams","hooks_url":"https://api.github.com/repos/jphoenix86/real_time/hooks","issue_events_url":"https://api.github.com/repos/jphoenix86/real_time/issues/events{/number}","events_url":"https://api.github.com/repos/jphoenix86/real_time/events","assignees_url":"https://api.github.com/repos/jphoenix86/real_time/assignees{/user}","branches_url":"https://api.github.com/repos/jphoenix86/real_time/branches{/branch}","tags_url":"https://api.github.com/repos/jphoenix86/real_time/tags","blobs_url":"https://api.github.com/repos/jphoenix86/real_time/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jphoenix86/real_time/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jphoenix86/real_time/git/refs{/sha}","trees_url":"https://api.github.com/repos/jphoenix86/real_time/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jphoenix86/real_time/statuses/{sha}","languages_url":"https://api.github.com/repos/jphoenix86/real_time/languages","stargazers_url":"https://api.github.com/repos/jphoenix86/real_time/stargazers","contributors_url":"https://api.github.com/repos/jphoenix86/real_time/contributors","subscribers_url":"https://api.github.com/repos/jphoenix86/real_time/subscribers","subscription_url":"https://api.github.com/repos/jphoenix86/real_time/subscription","commits_url":"https://api.github.com/repos/jphoenix86/real_time/commits{/sha}","git_commits_url":"https://api.github.com/repos/jphoenix86/real_time/git/commits{/sha}","comments_url":"https://api.github.com/repos/jphoenix86/real_time/comments{/number}","issue_comment_url":"https://api.github.com/repos/jphoenix86/real_time/issues/comments{/number}","contents_url":"https://api.github.com/repos/jphoenix86/real_time/contents/{+path}","compare_url":"https://api.github.com/repos/jphoenix86/real_time/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jphoenix86/real_time/merges","archive_url":"https://api.github.com/repos/jphoenix86/real_time/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jphoenix86/real_time/downloads","issues_url":"https://api.github.com/repos/jphoenix86/real_time/issues{/number}","pulls_url":"https://api.github.com/repos/jphoenix86/real_time/pulls{/number}","milestones_url":"https://api.github.com/repos/jphoenix86/real_time/milestones{/number}","notifications_url":"https://api.github.com/repos/jphoenix86/real_time/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jphoenix86/real_time/labels{/name}","releases_url":"https://api.github.com/repos/jphoenix86/real_time/releases{/id}","created_at":"2016-01-12T20:31:48Z","updated_at":"2016-01-13T19:53:17Z","pushed_at":"2016-01-18T01:06:53Z","git_url":"git://github.com/jphoenix86/real_time.git","ssh_url":"git@github.com:jphoenix86/real_time.git","clone_url":"https://github.com/jphoenix86/real_time.git","svn_url":"https://github.com/jphoenix86/real_time","homepage":null,"size":93,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jphoenix86/real_time/pulls/8"},"html":{"href":"https://github.com/jphoenix86/real_time/pull/8"},"issue":{"href":"https://api.github.com/repos/jphoenix86/real_time/issues/8"},"comments":{"href":"https://api.github.com/repos/jphoenix86/real_time/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/jphoenix86/real_time/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/jphoenix86/real_time/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jphoenix86/real_time/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/jphoenix86/real_time/statuses/84bada04e674e0e5e8b38f66df1d2cfbd1e8c163"}}}}