{"action":"created","comment":{"url":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/comments/44218127","id":44218127,"diff_hunk":"@@ -0,0 +1,90 @@\n+import path from 'path';\n+import {load as loadYaml} from 'node-yaml-config';\n+import {Database} from 'sqlite3';\n+\n+import {log} from '../utils.js';\n+\n+const config = loadYaml(path.join(__dirname, '..', '..', '..', 'config.yaml'));\n+\n+export const getStatus = (req, res) => {\n+  const hosts = Object.keys(config.hosts);\n+  res.json(hosts);\n+};\n+\n+export const getHostStatus = (req, res) => {\n+  const db = new Database('canaritus.db');\n+  const host = req.params.host;\n+\n+  db.serialize(() => {","path":"src/server/api/http.js","position":18,"original_position":18,"commit_id":"38f5f5660e22ac94e0e108ae875c85e7d53d46cc","original_commit_id":"38f5f5660e22ac94e0e108ae875c85e7d53d46cc","user":{"login":"Ikornaselur","id":3537289,"avatar_url":"https://avatars.githubusercontent.com/u/3537289?v=3","gravatar_id":"","url":"https://api.github.com/users/Ikornaselur","html_url":"https://github.com/Ikornaselur","followers_url":"https://api.github.com/users/Ikornaselur/followers","following_url":"https://api.github.com/users/Ikornaselur/following{/other_user}","gists_url":"https://api.github.com/users/Ikornaselur/gists{/gist_id}","starred_url":"https://api.github.com/users/Ikornaselur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ikornaselur/subscriptions","organizations_url":"https://api.github.com/users/Ikornaselur/orgs","repos_url":"https://api.github.com/users/Ikornaselur/repos","events_url":"https://api.github.com/users/Ikornaselur/events{/privacy}","received_events_url":"https://api.github.com/users/Ikornaselur/received_events","type":"User","site_admin":false},"body":"🐡","created_at":"2015-11-07T22:43:40Z","updated_at":"2015-11-07T22:43:40Z","html_url":"https://github.com/Ikornaselur/canaritus/pull/33#discussion_r44218127","pull_request_url":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/comments/44218127"},"html":{"href":"https://github.com/Ikornaselur/canaritus/pull/33#discussion_r44218127"},"pull_request":{"href":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/33","id":49954858,"html_url":"https://github.com/Ikornaselur/canaritus/pull/33","diff_url":"https://github.com/Ikornaselur/canaritus/pull/33.diff","patch_url":"https://github.com/Ikornaselur/canaritus/pull/33.patch","issue_url":"https://api.github.com/repos/Ikornaselur/canaritus/issues/33","number":33,"state":"open","locked":false,"title":"[WIP] Server rewrite","user":{"login":"Ikornaselur","id":3537289,"avatar_url":"https://avatars.githubusercontent.com/u/3537289?v=3","gravatar_id":"","url":"https://api.github.com/users/Ikornaselur","html_url":"https://github.com/Ikornaselur","followers_url":"https://api.github.com/users/Ikornaselur/followers","following_url":"https://api.github.com/users/Ikornaselur/following{/other_user}","gists_url":"https://api.github.com/users/Ikornaselur/gists{/gist_id}","starred_url":"https://api.github.com/users/Ikornaselur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ikornaselur/subscriptions","organizations_url":"https://api.github.com/users/Ikornaselur/orgs","repos_url":"https://api.github.com/users/Ikornaselur/repos","events_url":"https://api.github.com/users/Ikornaselur/events{/privacy}","received_events_url":"https://api.github.com/users/Ikornaselur/received_events","type":"User","site_admin":false},"body":"Rewrote the back-end.\r\n\r\nThis can't be merged until all the basic functionality that's now on master is present after the rewrite.\r\n\r\n### TODO\r\n- [x] Serve the service worker for the browser\r\n- [x] Allow the user to (un)subscribe to notification\r\n- [x] Serve the manifest.json\r\n- [x] Add the manifest.json to the main index file\r\n- [x] Set up the uptime checks again","created_at":"2015-11-06T13:45:20Z","updated_at":"2015-11-07T22:43:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1cfa772565081d493be7f6958f6b2ff3c3c22404","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/33/commits","review_comments_url":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/33/comments","review_comment_url":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ikornaselur/canaritus/issues/33/comments","statuses_url":"https://api.github.com/repos/Ikornaselur/canaritus/statuses/38f5f5660e22ac94e0e108ae875c85e7d53d46cc","head":{"label":"Ikornaselur:server-rewrite","ref":"server-rewrite","sha":"38f5f5660e22ac94e0e108ae875c85e7d53d46cc","user":{"login":"Ikornaselur","id":3537289,"avatar_url":"https://avatars.githubusercontent.com/u/3537289?v=3","gravatar_id":"","url":"https://api.github.com/users/Ikornaselur","html_url":"https://github.com/Ikornaselur","followers_url":"https://api.github.com/users/Ikornaselur/followers","following_url":"https://api.github.com/users/Ikornaselur/following{/other_user}","gists_url":"https://api.github.com/users/Ikornaselur/gists{/gist_id}","starred_url":"https://api.github.com/users/Ikornaselur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ikornaselur/subscriptions","organizations_url":"https://api.github.com/users/Ikornaselur/orgs","repos_url":"https://api.github.com/users/Ikornaselur/repos","events_url":"https://api.github.com/users/Ikornaselur/events{/privacy}","received_events_url":"https://api.github.com/users/Ikornaselur/received_events","type":"User","site_admin":false},"repo":{"id":44705064,"name":"canaritus","full_name":"Ikornaselur/canaritus","owner":{"login":"Ikornaselur","id":3537289,"avatar_url":"https://avatars.githubusercontent.com/u/3537289?v=3","gravatar_id":"","url":"https://api.github.com/users/Ikornaselur","html_url":"https://github.com/Ikornaselur","followers_url":"https://api.github.com/users/Ikornaselur/followers","following_url":"https://api.github.com/users/Ikornaselur/following{/other_user}","gists_url":"https://api.github.com/users/Ikornaselur/gists{/gist_id}","starred_url":"https://api.github.com/users/Ikornaselur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ikornaselur/subscriptions","organizations_url":"https://api.github.com/users/Ikornaselur/orgs","repos_url":"https://api.github.com/users/Ikornaselur/repos","events_url":"https://api.github.com/users/Ikornaselur/events{/privacy}","received_events_url":"https://api.github.com/users/Ikornaselur/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ikornaselur/canaritus","description":"Canary status - A simple self-hosted uptime status page","fork":false,"url":"https://api.github.com/repos/Ikornaselur/canaritus","forks_url":"https://api.github.com/repos/Ikornaselur/canaritus/forks","keys_url":"https://api.github.com/repos/Ikornaselur/canaritus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ikornaselur/canaritus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ikornaselur/canaritus/teams","hooks_url":"https://api.github.com/repos/Ikornaselur/canaritus/hooks","issue_events_url":"https://api.github.com/repos/Ikornaselur/canaritus/issues/events{/number}","events_url":"https://api.github.com/repos/Ikornaselur/canaritus/events","assignees_url":"https://api.github.com/repos/Ikornaselur/canaritus/assignees{/user}","branches_url":"https://api.github.com/repos/Ikornaselur/canaritus/branches{/branch}","tags_url":"https://api.github.com/repos/Ikornaselur/canaritus/tags","blobs_url":"https://api.github.com/repos/Ikornaselur/canaritus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ikornaselur/canaritus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ikornaselur/canaritus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ikornaselur/canaritus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ikornaselur/canaritus/statuses/{sha}","languages_url":"https://api.github.com/repos/Ikornaselur/canaritus/languages","stargazers_url":"https://api.github.com/repos/Ikornaselur/canaritus/stargazers","contributors_url":"https://api.github.com/repos/Ikornaselur/canaritus/contributors","subscribers_url":"https://api.github.com/repos/Ikornaselur/canaritus/subscribers","subscription_url":"https://api.github.com/repos/Ikornaselur/canaritus/subscription","commits_url":"https://api.github.com/repos/Ikornaselur/canaritus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ikornaselur/canaritus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ikornaselur/canaritus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ikornaselur/canaritus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ikornaselur/canaritus/contents/{+path}","compare_url":"https://api.github.com/repos/Ikornaselur/canaritus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ikornaselur/canaritus/merges","archive_url":"https://api.github.com/repos/Ikornaselur/canaritus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ikornaselur/canaritus/downloads","issues_url":"https://api.github.com/repos/Ikornaselur/canaritus/issues{/number}","pulls_url":"https://api.github.com/repos/Ikornaselur/canaritus/pulls{/number}","milestones_url":"https://api.github.com/repos/Ikornaselur/canaritus/milestones{/number}","notifications_url":"https://api.github.com/repos/Ikornaselur/canaritus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ikornaselur/canaritus/labels{/name}","releases_url":"https://api.github.com/repos/Ikornaselur/canaritus/releases{/id}","created_at":"2015-10-21T21:17:05Z","updated_at":"2015-10-23T21:07:51Z","pushed_at":"2015-11-07T20:51:15Z","git_url":"git://github.com/Ikornaselur/canaritus.git","ssh_url":"git@github.com:Ikornaselur/canaritus.git","clone_url":"https://github.com/Ikornaselur/canaritus.git","svn_url":"https://github.com/Ikornaselur/canaritus","homepage":"","size":335,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":17,"forks":1,"open_issues":17,"watchers":1,"default_branch":"master"}},"base":{"label":"Ikornaselur:master","ref":"master","sha":"f5d839823607ee2f5257b72ac86f6bcdb8a4311e","user":{"login":"Ikornaselur","id":3537289,"avatar_url":"https://avatars.githubusercontent.com/u/3537289?v=3","gravatar_id":"","url":"https://api.github.com/users/Ikornaselur","html_url":"https://github.com/Ikornaselur","followers_url":"https://api.github.com/users/Ikornaselur/followers","following_url":"https://api.github.com/users/Ikornaselur/following{/other_user}","gists_url":"https://api.github.com/users/Ikornaselur/gists{/gist_id}","starred_url":"https://api.github.com/users/Ikornaselur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ikornaselur/subscriptions","organizations_url":"https://api.github.com/users/Ikornaselur/orgs","repos_url":"https://api.github.com/users/Ikornaselur/repos","events_url":"https://api.github.com/users/Ikornaselur/events{/privacy}","received_events_url":"https://api.github.com/users/Ikornaselur/received_events","type":"User","site_admin":false},"repo":{"id":44705064,"name":"canaritus","full_name":"Ikornaselur/canaritus","owner":{"login":"Ikornaselur","id":3537289,"avatar_url":"https://avatars.githubusercontent.com/u/3537289?v=3","gravatar_id":"","url":"https://api.github.com/users/Ikornaselur","html_url":"https://github.com/Ikornaselur","followers_url":"https://api.github.com/users/Ikornaselur/followers","following_url":"https://api.github.com/users/Ikornaselur/following{/other_user}","gists_url":"https://api.github.com/users/Ikornaselur/gists{/gist_id}","starred_url":"https://api.github.com/users/Ikornaselur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ikornaselur/subscriptions","organizations_url":"https://api.github.com/users/Ikornaselur/orgs","repos_url":"https://api.github.com/users/Ikornaselur/repos","events_url":"https://api.github.com/users/Ikornaselur/events{/privacy}","received_events_url":"https://api.github.com/users/Ikornaselur/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ikornaselur/canaritus","description":"Canary status - A simple self-hosted uptime status page","fork":false,"url":"https://api.github.com/repos/Ikornaselur/canaritus","forks_url":"https://api.github.com/repos/Ikornaselur/canaritus/forks","keys_url":"https://api.github.com/repos/Ikornaselur/canaritus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ikornaselur/canaritus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ikornaselur/canaritus/teams","hooks_url":"https://api.github.com/repos/Ikornaselur/canaritus/hooks","issue_events_url":"https://api.github.com/repos/Ikornaselur/canaritus/issues/events{/number}","events_url":"https://api.github.com/repos/Ikornaselur/canaritus/events","assignees_url":"https://api.github.com/repos/Ikornaselur/canaritus/assignees{/user}","branches_url":"https://api.github.com/repos/Ikornaselur/canaritus/branches{/branch}","tags_url":"https://api.github.com/repos/Ikornaselur/canaritus/tags","blobs_url":"https://api.github.com/repos/Ikornaselur/canaritus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ikornaselur/canaritus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ikornaselur/canaritus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ikornaselur/canaritus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ikornaselur/canaritus/statuses/{sha}","languages_url":"https://api.github.com/repos/Ikornaselur/canaritus/languages","stargazers_url":"https://api.github.com/repos/Ikornaselur/canaritus/stargazers","contributors_url":"https://api.github.com/repos/Ikornaselur/canaritus/contributors","subscribers_url":"https://api.github.com/repos/Ikornaselur/canaritus/subscribers","subscription_url":"https://api.github.com/repos/Ikornaselur/canaritus/subscription","commits_url":"https://api.github.com/repos/Ikornaselur/canaritus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ikornaselur/canaritus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ikornaselur/canaritus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ikornaselur/canaritus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ikornaselur/canaritus/contents/{+path}","compare_url":"https://api.github.com/repos/Ikornaselur/canaritus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ikornaselur/canaritus/merges","archive_url":"https://api.github.com/repos/Ikornaselur/canaritus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ikornaselur/canaritus/downloads","issues_url":"https://api.github.com/repos/Ikornaselur/canaritus/issues{/number}","pulls_url":"https://api.github.com/repos/Ikornaselur/canaritus/pulls{/number}","milestones_url":"https://api.github.com/repos/Ikornaselur/canaritus/milestones{/number}","notifications_url":"https://api.github.com/repos/Ikornaselur/canaritus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ikornaselur/canaritus/labels{/name}","releases_url":"https://api.github.com/repos/Ikornaselur/canaritus/releases{/id}","created_at":"2015-10-21T21:17:05Z","updated_at":"2015-10-23T21:07:51Z","pushed_at":"2015-11-07T20:51:15Z","git_url":"git://github.com/Ikornaselur/canaritus.git","ssh_url":"git@github.com:Ikornaselur/canaritus.git","clone_url":"https://github.com/Ikornaselur/canaritus.git","svn_url":"https://github.com/Ikornaselur/canaritus","homepage":"","size":335,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":17,"forks":1,"open_issues":17,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/33"},"html":{"href":"https://github.com/Ikornaselur/canaritus/pull/33"},"issue":{"href":"https://api.github.com/repos/Ikornaselur/canaritus/issues/33"},"comments":{"href":"https://api.github.com/repos/Ikornaselur/canaritus/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ikornaselur/canaritus/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/Ikornaselur/canaritus/statuses/38f5f5660e22ac94e0e108ae875c85e7d53d46cc"}}}}