{"action":"created","comment":{"url":"https://api.github.com/repos/clipper-digital/stok/pulls/comments/59443089","id":59443089,"diff_hunk":"@@ -0,0 +1,78 @@\n+'use strict';\n+\n+const Hapi = require('hapi');\n+\n+class Stok {\n+  constructor(options) {\n+    this.options = options;\n+  }\n+\n+  createServer(routes) {\n+    return new Promise((resolve, reject) => {\n+      const server = new Hapi.Server();\n+      server.connection({ port: this.options.web.port });\n+\n+      // Monkey patch the route method and add error handling to\n+      // all of our routes\n+      server.route = ((original) => {\n+        routes => {","path":"stok.js","position":18,"original_position":18,"commit_id":"f54037d185006944a6161cc5851a8c0a76cf96c1","original_commit_id":"f54037d185006944a6161cc5851a8c0a76cf96c1","user":{"login":"scottgonzalez","id":141167,"avatar_url":"https://avatars.githubusercontent.com/u/141167?v=3","gravatar_id":"","url":"https://api.github.com/users/scottgonzalez","html_url":"https://github.com/scottgonzalez","followers_url":"https://api.github.com/users/scottgonzalez/followers","following_url":"https://api.github.com/users/scottgonzalez/following{/other_user}","gists_url":"https://api.github.com/users/scottgonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/scottgonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottgonzalez/subscriptions","organizations_url":"https://api.github.com/users/scottgonzalez/orgs","repos_url":"https://api.github.com/users/scottgonzalez/repos","events_url":"https://api.github.com/users/scottgonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/scottgonzalez/received_events","type":"User","site_admin":false},"body":"You need to return this function.","created_at":"2016-04-12T20:01:17Z","updated_at":"2016-04-12T20:01:17Z","html_url":"https://github.com/clipper-digital/stok/pull/1#discussion_r59443089","pull_request_url":"https://api.github.com/repos/clipper-digital/stok/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/clipper-digital/stok/pulls/comments/59443089"},"html":{"href":"https://github.com/clipper-digital/stok/pull/1#discussion_r59443089"},"pull_request":{"href":"https://api.github.com/repos/clipper-digital/stok/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/clipper-digital/stok/pulls/1","id":66217835,"html_url":"https://github.com/clipper-digital/stok/pull/1","diff_url":"https://github.com/clipper-digital/stok/pull/1.diff","patch_url":"https://github.com/clipper-digital/stok/pull/1.patch","issue_url":"https://api.github.com/repos/clipper-digital/stok/issues/1","number":1,"state":"open","locked":false,"title":"Add wrapper for Hapi server creation.","user":{"login":"kpollich","id":6766512,"avatar_url":"https://avatars.githubusercontent.com/u/6766512?v=3","gravatar_id":"","url":"https://api.github.com/users/kpollich","html_url":"https://github.com/kpollich","followers_url":"https://api.github.com/users/kpollich/followers","following_url":"https://api.github.com/users/kpollich/following{/other_user}","gists_url":"https://api.github.com/users/kpollich/gists{/gist_id}","starred_url":"https://api.github.com/users/kpollich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpollich/subscriptions","organizations_url":"https://api.github.com/users/kpollich/orgs","repos_url":"https://api.github.com/users/kpollich/repos","events_url":"https://api.github.com/users/kpollich/events{/privacy}","received_events_url":"https://api.github.com/users/kpollich/received_events","type":"User","site_admin":false},"body":"Also add project config files (editorconfig, jscs, etc).","created_at":"2016-04-12T19:56:50Z","updated_at":"2016-04-12T20:01:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af8313b86cbff83dae8c8aec91237d57428a73a0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/clipper-digital/stok/pulls/1/commits","review_comments_url":"https://api.github.com/repos/clipper-digital/stok/pulls/1/comments","review_comment_url":"https://api.github.com/repos/clipper-digital/stok/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clipper-digital/stok/issues/1/comments","statuses_url":"https://api.github.com/repos/clipper-digital/stok/statuses/f54037d185006944a6161cc5851a8c0a76cf96c1","head":{"label":"kpollich:server-creation","ref":"server-creation","sha":"f54037d185006944a6161cc5851a8c0a76cf96c1","user":{"login":"kpollich","id":6766512,"avatar_url":"https://avatars.githubusercontent.com/u/6766512?v=3","gravatar_id":"","url":"https://api.github.com/users/kpollich","html_url":"https://github.com/kpollich","followers_url":"https://api.github.com/users/kpollich/followers","following_url":"https://api.github.com/users/kpollich/following{/other_user}","gists_url":"https://api.github.com/users/kpollich/gists{/gist_id}","starred_url":"https://api.github.com/users/kpollich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpollich/subscriptions","organizations_url":"https://api.github.com/users/kpollich/orgs","repos_url":"https://api.github.com/users/kpollich/repos","events_url":"https://api.github.com/users/kpollich/events{/privacy}","received_events_url":"https://api.github.com/users/kpollich/received_events","type":"User","site_admin":false},"repo":{"id":56093388,"name":"stok","full_name":"kpollich/stok","owner":{"login":"kpollich","id":6766512,"avatar_url":"https://avatars.githubusercontent.com/u/6766512?v=3","gravatar_id":"","url":"https://api.github.com/users/kpollich","html_url":"https://github.com/kpollich","followers_url":"https://api.github.com/users/kpollich/followers","following_url":"https://api.github.com/users/kpollich/following{/other_user}","gists_url":"https://api.github.com/users/kpollich/gists{/gist_id}","starred_url":"https://api.github.com/users/kpollich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpollich/subscriptions","organizations_url":"https://api.github.com/users/kpollich/orgs","repos_url":"https://api.github.com/users/kpollich/repos","events_url":"https://api.github.com/users/kpollich/events{/privacy}","received_events_url":"https://api.github.com/users/kpollich/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kpollich/stok","description":"Boilerplate Node Application","fork":true,"url":"https://api.github.com/repos/kpollich/stok","forks_url":"https://api.github.com/repos/kpollich/stok/forks","keys_url":"https://api.github.com/repos/kpollich/stok/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kpollich/stok/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kpollich/stok/teams","hooks_url":"https://api.github.com/repos/kpollich/stok/hooks","issue_events_url":"https://api.github.com/repos/kpollich/stok/issues/events{/number}","events_url":"https://api.github.com/repos/kpollich/stok/events","assignees_url":"https://api.github.com/repos/kpollich/stok/assignees{/user}","branches_url":"https://api.github.com/repos/kpollich/stok/branches{/branch}","tags_url":"https://api.github.com/repos/kpollich/stok/tags","blobs_url":"https://api.github.com/repos/kpollich/stok/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kpollich/stok/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kpollich/stok/git/refs{/sha}","trees_url":"https://api.github.com/repos/kpollich/stok/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kpollich/stok/statuses/{sha}","languages_url":"https://api.github.com/repos/kpollich/stok/languages","stargazers_url":"https://api.github.com/repos/kpollich/stok/stargazers","contributors_url":"https://api.github.com/repos/kpollich/stok/contributors","subscribers_url":"https://api.github.com/repos/kpollich/stok/subscribers","subscription_url":"https://api.github.com/repos/kpollich/stok/subscription","commits_url":"https://api.github.com/repos/kpollich/stok/commits{/sha}","git_commits_url":"https://api.github.com/repos/kpollich/stok/git/commits{/sha}","comments_url":"https://api.github.com/repos/kpollich/stok/comments{/number}","issue_comment_url":"https://api.github.com/repos/kpollich/stok/issues/comments{/number}","contents_url":"https://api.github.com/repos/kpollich/stok/contents/{+path}","compare_url":"https://api.github.com/repos/kpollich/stok/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kpollich/stok/merges","archive_url":"https://api.github.com/repos/kpollich/stok/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kpollich/stok/downloads","issues_url":"https://api.github.com/repos/kpollich/stok/issues{/number}","pulls_url":"https://api.github.com/repos/kpollich/stok/pulls{/number}","milestones_url":"https://api.github.com/repos/kpollich/stok/milestones{/number}","notifications_url":"https://api.github.com/repos/kpollich/stok/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kpollich/stok/labels{/name}","releases_url":"https://api.github.com/repos/kpollich/stok/releases{/id}","deployments_url":"https://api.github.com/repos/kpollich/stok/deployments","created_at":"2016-04-12T19:55:17Z","updated_at":"2016-04-12T15:40:14Z","pushed_at":"2016-04-12T19:56:09Z","git_url":"git://github.com/kpollich/stok.git","ssh_url":"git@github.com:kpollich/stok.git","clone_url":"https://github.com/kpollich/stok.git","svn_url":"https://github.com/kpollich/stok","homepage":null,"size":2,"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":"clipper-digital:master","ref":"master","sha":"2de43bb0d62fbdb4821e5f571a931cb8ddbe7033","user":{"login":"clipper-digital","id":15095042,"avatar_url":"https://avatars.githubusercontent.com/u/15095042?v=3","gravatar_id":"","url":"https://api.github.com/users/clipper-digital","html_url":"https://github.com/clipper-digital","followers_url":"https://api.github.com/users/clipper-digital/followers","following_url":"https://api.github.com/users/clipper-digital/following{/other_user}","gists_url":"https://api.github.com/users/clipper-digital/gists{/gist_id}","starred_url":"https://api.github.com/users/clipper-digital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clipper-digital/subscriptions","organizations_url":"https://api.github.com/users/clipper-digital/orgs","repos_url":"https://api.github.com/users/clipper-digital/repos","events_url":"https://api.github.com/users/clipper-digital/events{/privacy}","received_events_url":"https://api.github.com/users/clipper-digital/received_events","type":"Organization","site_admin":false},"repo":{"id":56076142,"name":"stok","full_name":"clipper-digital/stok","owner":{"login":"clipper-digital","id":15095042,"avatar_url":"https://avatars.githubusercontent.com/u/15095042?v=3","gravatar_id":"","url":"https://api.github.com/users/clipper-digital","html_url":"https://github.com/clipper-digital","followers_url":"https://api.github.com/users/clipper-digital/followers","following_url":"https://api.github.com/users/clipper-digital/following{/other_user}","gists_url":"https://api.github.com/users/clipper-digital/gists{/gist_id}","starred_url":"https://api.github.com/users/clipper-digital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clipper-digital/subscriptions","organizations_url":"https://api.github.com/users/clipper-digital/orgs","repos_url":"https://api.github.com/users/clipper-digital/repos","events_url":"https://api.github.com/users/clipper-digital/events{/privacy}","received_events_url":"https://api.github.com/users/clipper-digital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clipper-digital/stok","description":"Boilerplate Node Application","fork":false,"url":"https://api.github.com/repos/clipper-digital/stok","forks_url":"https://api.github.com/repos/clipper-digital/stok/forks","keys_url":"https://api.github.com/repos/clipper-digital/stok/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clipper-digital/stok/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clipper-digital/stok/teams","hooks_url":"https://api.github.com/repos/clipper-digital/stok/hooks","issue_events_url":"https://api.github.com/repos/clipper-digital/stok/issues/events{/number}","events_url":"https://api.github.com/repos/clipper-digital/stok/events","assignees_url":"https://api.github.com/repos/clipper-digital/stok/assignees{/user}","branches_url":"https://api.github.com/repos/clipper-digital/stok/branches{/branch}","tags_url":"https://api.github.com/repos/clipper-digital/stok/tags","blobs_url":"https://api.github.com/repos/clipper-digital/stok/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clipper-digital/stok/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clipper-digital/stok/git/refs{/sha}","trees_url":"https://api.github.com/repos/clipper-digital/stok/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clipper-digital/stok/statuses/{sha}","languages_url":"https://api.github.com/repos/clipper-digital/stok/languages","stargazers_url":"https://api.github.com/repos/clipper-digital/stok/stargazers","contributors_url":"https://api.github.com/repos/clipper-digital/stok/contributors","subscribers_url":"https://api.github.com/repos/clipper-digital/stok/subscribers","subscription_url":"https://api.github.com/repos/clipper-digital/stok/subscription","commits_url":"https://api.github.com/repos/clipper-digital/stok/commits{/sha}","git_commits_url":"https://api.github.com/repos/clipper-digital/stok/git/commits{/sha}","comments_url":"https://api.github.com/repos/clipper-digital/stok/comments{/number}","issue_comment_url":"https://api.github.com/repos/clipper-digital/stok/issues/comments{/number}","contents_url":"https://api.github.com/repos/clipper-digital/stok/contents/{+path}","compare_url":"https://api.github.com/repos/clipper-digital/stok/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clipper-digital/stok/merges","archive_url":"https://api.github.com/repos/clipper-digital/stok/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clipper-digital/stok/downloads","issues_url":"https://api.github.com/repos/clipper-digital/stok/issues{/number}","pulls_url":"https://api.github.com/repos/clipper-digital/stok/pulls{/number}","milestones_url":"https://api.github.com/repos/clipper-digital/stok/milestones{/number}","notifications_url":"https://api.github.com/repos/clipper-digital/stok/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clipper-digital/stok/labels{/name}","releases_url":"https://api.github.com/repos/clipper-digital/stok/releases{/id}","deployments_url":"https://api.github.com/repos/clipper-digital/stok/deployments","created_at":"2016-04-12T15:39:14Z","updated_at":"2016-04-12T15:40:14Z","pushed_at":"2016-04-12T19:56:50Z","git_url":"git://github.com/clipper-digital/stok.git","ssh_url":"git@github.com:clipper-digital/stok.git","clone_url":"https://github.com/clipper-digital/stok.git","svn_url":"https://github.com/clipper-digital/stok","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":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clipper-digital/stok/pulls/1"},"html":{"href":"https://github.com/clipper-digital/stok/pull/1"},"issue":{"href":"https://api.github.com/repos/clipper-digital/stok/issues/1"},"comments":{"href":"https://api.github.com/repos/clipper-digital/stok/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/clipper-digital/stok/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/clipper-digital/stok/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clipper-digital/stok/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/clipper-digital/stok/statuses/f54037d185006944a6161cc5851a8c0a76cf96c1"}}}}