{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/comments/31660257","id":31660257,"diff_hunk":"@@ -0,0 +1,50 @@\n+/* This creates a Hapi server which provides a RESTful API to allow Thimble to\n+ * create/update/delete projects to/from a persistent store and also publish\n+ * (make a project publicly available using the public access server) a project\n+*/\n+\n+var Server = require('hapi').Server;\n+var env = require('./environment.js');\n+var authentication = require('./authentication');\n+var routes = require('./routes');\n+\n+// Logging\n+var Good = require('good');\n+var GoodConsole = require('good-console');\n+var log = require('./logging.js');\n+\n+var server = new Server();\n+server.connection({ port: env.get('port') });\n+\n+// Configure authentication middleware\n+authentication(server);\n+\n+// Configure server end-points\n+routes(server);\n+\n+// Set up logging and start the server\n+log.setContext(server);\n+server.register({\n+  register: Good,\n+  options: {\n+    reporters: [{\n+      reporter: GoodConsole,\n+      events: {\n+        log: log.getEnabledTags()\n+      }\n+    }]\n+  }\n+}, function(err) {\n+  if(err) {\n+    log.disabled = true;\n+    console.warn('Failed to load logging plugin, disabling logging');\n+  }\n+\n+  server.start(function(err) {\n+    if(err) {\n+      log.fatal('Failed to start the server');","path":"app.js","position":45,"original_position":45,"commit_id":"4761a2070fa90e85339919f7d27e98f45fc5ea9f","original_commit_id":"4761a2070fa90e85339919f7d27e98f45fc5ea9f","user":{"login":"humphd","id":427398,"avatar_url":"https://avatars.githubusercontent.com/u/427398?v=3","gravatar_id":"","url":"https://api.github.com/users/humphd","html_url":"https://github.com/humphd","followers_url":"https://api.github.com/users/humphd/followers","following_url":"https://api.github.com/users/humphd/following{/other_user}","gists_url":"https://api.github.com/users/humphd/gists{/gist_id}","starred_url":"https://api.github.com/users/humphd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humphd/subscriptions","organizations_url":"https://api.github.com/users/humphd/orgs","repos_url":"https://api.github.com/users/humphd/repos","events_url":"https://api.github.com/users/humphd/events{/privacy}","received_events_url":"https://api.github.com/users/humphd/received_events","type":"User","site_admin":false},"body":"Can you also log the `err` object here so we know what happened?","created_at":"2015-06-03T19:26:48Z","updated_at":"2015-06-03T19:26:48Z","html_url":"https://github.com/mozilla/publish.webmaker.org/pull/2#discussion_r31660257","pull_request_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/comments/31660257"},"html":{"href":"https://github.com/mozilla/publish.webmaker.org/pull/2#discussion_r31660257"},"pull_request":{"href":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/2","id":36868106,"html_url":"https://github.com/mozilla/publish.webmaker.org/pull/2","diff_url":"https://github.com/mozilla/publish.webmaker.org/pull/2.diff","patch_url":"https://github.com/mozilla/publish.webmaker.org/pull/2.patch","issue_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/issues/2","number":2,"state":"open","locked":false,"title":"Add preliminary scaffolding for server routes and logging","user":{"login":"gideonthomas","id":5816130,"avatar_url":"https://avatars.githubusercontent.com/u/5816130?v=3","gravatar_id":"","url":"https://api.github.com/users/gideonthomas","html_url":"https://github.com/gideonthomas","followers_url":"https://api.github.com/users/gideonthomas/followers","following_url":"https://api.github.com/users/gideonthomas/following{/other_user}","gists_url":"https://api.github.com/users/gideonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/gideonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gideonthomas/subscriptions","organizations_url":"https://api.github.com/users/gideonthomas/orgs","repos_url":"https://api.github.com/users/gideonthomas/repos","events_url":"https://api.github.com/users/gideonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/gideonthomas/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-03T19:22:54Z","updated_at":"2015-06-03T19:26:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91a44732b1cee1c746a4cee6d418b4373d714d83","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/2/commits","review_comments_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/2/comments","review_comment_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/issues/2/comments","statuses_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/statuses/4761a2070fa90e85339919f7d27e98f45fc5ea9f","head":{"label":"gideonthomas:issue1","ref":"issue1","sha":"4761a2070fa90e85339919f7d27e98f45fc5ea9f","user":{"login":"gideonthomas","id":5816130,"avatar_url":"https://avatars.githubusercontent.com/u/5816130?v=3","gravatar_id":"","url":"https://api.github.com/users/gideonthomas","html_url":"https://github.com/gideonthomas","followers_url":"https://api.github.com/users/gideonthomas/followers","following_url":"https://api.github.com/users/gideonthomas/following{/other_user}","gists_url":"https://api.github.com/users/gideonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/gideonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gideonthomas/subscriptions","organizations_url":"https://api.github.com/users/gideonthomas/orgs","repos_url":"https://api.github.com/users/gideonthomas/repos","events_url":"https://api.github.com/users/gideonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/gideonthomas/received_events","type":"User","site_admin":false},"repo":{"id":36807804,"name":"publish.webmaker.org","full_name":"gideonthomas/publish.webmaker.org","owner":{"login":"gideonthomas","id":5816130,"avatar_url":"https://avatars.githubusercontent.com/u/5816130?v=3","gravatar_id":"","url":"https://api.github.com/users/gideonthomas","html_url":"https://github.com/gideonthomas","followers_url":"https://api.github.com/users/gideonthomas/followers","following_url":"https://api.github.com/users/gideonthomas/following{/other_user}","gists_url":"https://api.github.com/users/gideonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/gideonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gideonthomas/subscriptions","organizations_url":"https://api.github.com/users/gideonthomas/orgs","repos_url":"https://api.github.com/users/gideonthomas/repos","events_url":"https://api.github.com/users/gideonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/gideonthomas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gideonthomas/publish.webmaker.org","description":"The teach.org publishing service for goggles and thimble","fork":true,"url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org","forks_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/forks","keys_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/teams","hooks_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/hooks","issue_events_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/issues/events{/number}","events_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/events","assignees_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/assignees{/user}","branches_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/branches{/branch}","tags_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/tags","blobs_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/statuses/{sha}","languages_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/languages","stargazers_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/stargazers","contributors_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/contributors","subscribers_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/subscribers","subscription_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/subscription","commits_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/contents/{+path}","compare_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/merges","archive_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/downloads","issues_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/issues{/number}","pulls_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/pulls{/number}","milestones_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/milestones{/number}","notifications_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/labels{/name}","releases_url":"https://api.github.com/repos/gideonthomas/publish.webmaker.org/releases{/id}","created_at":"2015-06-03T14:08:01Z","updated_at":"2015-06-02T21:02:31Z","pushed_at":"2015-06-03T19:23:34Z","git_url":"git://github.com/gideonthomas/publish.webmaker.org.git","ssh_url":"git@github.com:gideonthomas/publish.webmaker.org.git","clone_url":"https://github.com/gideonthomas/publish.webmaker.org.git","svn_url":"https://github.com/gideonthomas/publish.webmaker.org","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"cfe09bb107d5903728ed54cc4f8bc92543370ccf","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":36752205,"name":"publish.webmaker.org","full_name":"mozilla/publish.webmaker.org","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/publish.webmaker.org","description":"The teach.org publishing service for goggles and thimble","fork":false,"url":"https://api.github.com/repos/mozilla/publish.webmaker.org","forks_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/forks","keys_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/teams","hooks_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/hooks","issue_events_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/events","assignees_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/tags","blobs_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/languages","stargazers_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/stargazers","contributors_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/contributors","subscribers_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/subscribers","subscription_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/subscription","commits_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/merges","archive_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/downloads","issues_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/publish.webmaker.org/releases{/id}","created_at":"2015-06-02T18:10:38Z","updated_at":"2015-06-02T21:02:31Z","pushed_at":"2015-06-03T19:23:35Z","git_url":"git://github.com/mozilla/publish.webmaker.org.git","ssh_url":"git@github.com:mozilla/publish.webmaker.org.git","clone_url":"https://github.com/mozilla/publish.webmaker.org.git","svn_url":"https://github.com/mozilla/publish.webmaker.org","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/2"},"html":{"href":"https://github.com/mozilla/publish.webmaker.org/pull/2"},"issue":{"href":"https://api.github.com/repos/mozilla/publish.webmaker.org/issues/2"},"comments":{"href":"https://api.github.com/repos/mozilla/publish.webmaker.org/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/publish.webmaker.org/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/publish.webmaker.org/statuses/4761a2070fa90e85339919f7d27e98f45fc5ea9f"}}}}