{"action":"created","comment":{"url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/comments/27944652","id":27944652,"diff_hunk":"@@ -1,49 +1,20 @@\n+'use strict';\n+\n+var RedisStore = require('socket.io/lib/stores/redis');\n var express = require('express');\n var mongoose = require('mongoose');\n-var card = require('./models/card');\n-var list = require('./models/list');\n-var board = require('./models/board');\n-var routes = require('./routes');\n-var sockets = require('./sockets');\n+var passport = require('./services/auth');\n+var app = express.createServer();\n+var infra = require('./services/infra');","path":"app.js","position":13,"original_position":13,"commit_id":"e7c268a78ef19035cec7a59fb32deace662490cd","original_commit_id":"e7c268a78ef19035cec7a59fb32deace662490cd","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"'require' is not defined.","created_at":"2015-04-08T05:54:18Z","updated_at":"2015-04-08T05:54:18Z","html_url":"https://github.com/onepiecejs/nodejs-cantas/pull/103#discussion_r27944652","pull_request_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/103","_links":{"self":{"href":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/comments/27944652"},"html":{"href":"https://github.com/onepiecejs/nodejs-cantas/pull/103#discussion_r27944652"},"pull_request":{"href":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/103"}}},"pull_request":{"url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/103","id":32830471,"html_url":"https://github.com/onepiecejs/nodejs-cantas/pull/103","diff_url":"https://github.com/onepiecejs/nodejs-cantas/pull/103.diff","patch_url":"https://github.com/onepiecejs/nodejs-cantas/pull/103.patch","issue_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/issues/103","number":103,"state":"open","locked":false,"title":"refactor app.js","user":{"login":"tkdchen","id":919706,"avatar_url":"https://avatars.githubusercontent.com/u/919706?v=3","gravatar_id":"","url":"https://api.github.com/users/tkdchen","html_url":"https://github.com/tkdchen","followers_url":"https://api.github.com/users/tkdchen/followers","following_url":"https://api.github.com/users/tkdchen/following{/other_user}","gists_url":"https://api.github.com/users/tkdchen/gists{/gist_id}","starred_url":"https://api.github.com/users/tkdchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkdchen/subscriptions","organizations_url":"https://api.github.com/users/tkdchen/orgs","repos_url":"https://api.github.com/users/tkdchen/repos","events_url":"https://api.github.com/users/tkdchen/events{/privacy}","received_events_url":"https://api.github.com/users/tkdchen/received_events","type":"User","site_admin":false},"body":"Aims to clean and modularize part of code to make it resuable.\r\n/services/infra.js is added to hold code that maintains connections and\r\ncreations to infrastructure services, for instance MongoDB and Redis.\r\n\r\nDuring cleaning app.js, this patch also fixes an issue #102, that is, requiring\r\n/models/board in card.js returns empty object due to the circular dependency.","created_at":"2015-04-08T05:54:13Z","updated_at":"2015-04-08T05:54:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bf41cb2ff0428f6d4f9b26d0a6e09ca9f3793f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/103/commits","review_comments_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/103/comments","review_comment_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/issues/103/comments","statuses_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/statuses/e7c268a78ef19035cec7a59fb32deace662490cd","head":{"label":"tkdchen:refactor-app.js","ref":"refactor-app.js","sha":"e7c268a78ef19035cec7a59fb32deace662490cd","user":{"login":"tkdchen","id":919706,"avatar_url":"https://avatars.githubusercontent.com/u/919706?v=3","gravatar_id":"","url":"https://api.github.com/users/tkdchen","html_url":"https://github.com/tkdchen","followers_url":"https://api.github.com/users/tkdchen/followers","following_url":"https://api.github.com/users/tkdchen/following{/other_user}","gists_url":"https://api.github.com/users/tkdchen/gists{/gist_id}","starred_url":"https://api.github.com/users/tkdchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkdchen/subscriptions","organizations_url":"https://api.github.com/users/tkdchen/orgs","repos_url":"https://api.github.com/users/tkdchen/repos","events_url":"https://api.github.com/users/tkdchen/events{/privacy}","received_events_url":"https://api.github.com/users/tkdchen/received_events","type":"User","site_admin":false},"repo":{"id":14643262,"name":"nodejs-cantas","full_name":"tkdchen/nodejs-cantas","owner":{"login":"tkdchen","id":919706,"avatar_url":"https://avatars.githubusercontent.com/u/919706?v=3","gravatar_id":"","url":"https://api.github.com/users/tkdchen","html_url":"https://github.com/tkdchen","followers_url":"https://api.github.com/users/tkdchen/followers","following_url":"https://api.github.com/users/tkdchen/following{/other_user}","gists_url":"https://api.github.com/users/tkdchen/gists{/gist_id}","starred_url":"https://api.github.com/users/tkdchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkdchen/subscriptions","organizations_url":"https://api.github.com/users/tkdchen/orgs","repos_url":"https://api.github.com/users/tkdchen/repos","events_url":"https://api.github.com/users/tkdchen/events{/privacy}","received_events_url":"https://api.github.com/users/tkdchen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tkdchen/nodejs-cantas","description":"Cantas is a real-time collaborative web application.","fork":true,"url":"https://api.github.com/repos/tkdchen/nodejs-cantas","forks_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/forks","keys_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/teams","hooks_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/hooks","issue_events_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/issues/events{/number}","events_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/events","assignees_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/assignees{/user}","branches_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/branches{/branch}","tags_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/tags","blobs_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/git/refs{/sha}","trees_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/statuses/{sha}","languages_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/languages","stargazers_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/stargazers","contributors_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/contributors","subscribers_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/subscribers","subscription_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/subscription","commits_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/commits{/sha}","git_commits_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/git/commits{/sha}","comments_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/comments{/number}","issue_comment_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/issues/comments{/number}","contents_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/contents/{+path}","compare_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/merges","archive_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/downloads","issues_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/issues{/number}","pulls_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/pulls{/number}","milestones_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/milestones{/number}","notifications_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/labels{/name}","releases_url":"https://api.github.com/repos/tkdchen/nodejs-cantas/releases{/id}","created_at":"2013-11-23T14:01:23Z","updated_at":"2015-04-05T02:35:32Z","pushed_at":"2015-04-08T05:53:47Z","git_url":"git://github.com/tkdchen/nodejs-cantas.git","ssh_url":"git@github.com:tkdchen/nodejs-cantas.git","clone_url":"https://github.com/tkdchen/nodejs-cantas.git","svn_url":"https://github.com/tkdchen/nodejs-cantas","homepage":null,"size":5488,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"onepiecejs:master","ref":"master","sha":"f7cc85f62ccdc4e85edeb1dbd5cd098c7126bb3d","user":{"login":"onepiecejs","id":5965637,"avatar_url":"https://avatars.githubusercontent.com/u/5965637?v=3","gravatar_id":"","url":"https://api.github.com/users/onepiecejs","html_url":"https://github.com/onepiecejs","followers_url":"https://api.github.com/users/onepiecejs/followers","following_url":"https://api.github.com/users/onepiecejs/following{/other_user}","gists_url":"https://api.github.com/users/onepiecejs/gists{/gist_id}","starred_url":"https://api.github.com/users/onepiecejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onepiecejs/subscriptions","organizations_url":"https://api.github.com/users/onepiecejs/orgs","repos_url":"https://api.github.com/users/onepiecejs/repos","events_url":"https://api.github.com/users/onepiecejs/events{/privacy}","received_events_url":"https://api.github.com/users/onepiecejs/received_events","type":"Organization","site_admin":false},"repo":{"id":14622577,"name":"nodejs-cantas","full_name":"onepiecejs/nodejs-cantas","owner":{"login":"onepiecejs","id":5965637,"avatar_url":"https://avatars.githubusercontent.com/u/5965637?v=3","gravatar_id":"","url":"https://api.github.com/users/onepiecejs","html_url":"https://github.com/onepiecejs","followers_url":"https://api.github.com/users/onepiecejs/followers","following_url":"https://api.github.com/users/onepiecejs/following{/other_user}","gists_url":"https://api.github.com/users/onepiecejs/gists{/gist_id}","starred_url":"https://api.github.com/users/onepiecejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onepiecejs/subscriptions","organizations_url":"https://api.github.com/users/onepiecejs/orgs","repos_url":"https://api.github.com/users/onepiecejs/repos","events_url":"https://api.github.com/users/onepiecejs/events{/privacy}","received_events_url":"https://api.github.com/users/onepiecejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/onepiecejs/nodejs-cantas","description":"Cantas is a real-time collaborative web application. Official repository","fork":false,"url":"https://api.github.com/repos/onepiecejs/nodejs-cantas","forks_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/forks","keys_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/teams","hooks_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/hooks","issue_events_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/issues/events{/number}","events_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/events","assignees_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/assignees{/user}","branches_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/branches{/branch}","tags_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/tags","blobs_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/git/refs{/sha}","trees_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/statuses/{sha}","languages_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/languages","stargazers_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/stargazers","contributors_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/contributors","subscribers_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/subscribers","subscription_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/subscription","commits_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/commits{/sha}","git_commits_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/git/commits{/sha}","comments_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/comments{/number}","issue_comment_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/issues/comments{/number}","contents_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/contents/{+path}","compare_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/merges","archive_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/downloads","issues_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/issues{/number}","pulls_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls{/number}","milestones_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/milestones{/number}","notifications_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/labels{/name}","releases_url":"https://api.github.com/repos/onepiecejs/nodejs-cantas/releases{/id}","created_at":"2013-11-22T16:19:33Z","updated_at":"2015-04-07T15:05:38Z","pushed_at":"2015-04-08T05:54:13Z","git_url":"git://github.com/onepiecejs/nodejs-cantas.git","ssh_url":"git@github.com:onepiecejs/nodejs-cantas.git","clone_url":"https://github.com/onepiecejs/nodejs-cantas.git","svn_url":"https://github.com/onepiecejs/nodejs-cantas","homepage":"","size":5877,"stargazers_count":148,"watchers_count":148,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":37,"forks":59,"open_issues":37,"watchers":148,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/103"},"html":{"href":"https://github.com/onepiecejs/nodejs-cantas/pull/103"},"issue":{"href":"https://api.github.com/repos/onepiecejs/nodejs-cantas/issues/103"},"comments":{"href":"https://api.github.com/repos/onepiecejs/nodejs-cantas/issues/103/comments"},"review_comments":{"href":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/103/comments"},"review_comment":{"href":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/onepiecejs/nodejs-cantas/pulls/103/commits"},"statuses":{"href":"https://api.github.com/repos/onepiecejs/nodejs-cantas/statuses/e7c268a78ef19035cec7a59fb32deace662490cd"}}}}