{"action":"created","comment":{"url":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/comments/103602350","pull_request_review_id":24392962,"id":103602350,"diff_hunk":"@@ -184,19 +186,63 @@ module.exports = {\n       return;\n     }\n \n-    // Log\n-    Logs.show('server-started', {\n-      type: 'Info',\n-      message: null,\n-      params: {}\n+    // Grab the configurations\n+    const config = JSON.parse(Utils.readFileSync('./site.json', 'utf-8'));\n+    const portToSet = options.port || config.server.port || env.server.defaultPort;\n+\n+    // If the given port is different than whats in the config, update site.json with the new port\n+    if (portToSet !== config.server.port) {\n+      config.server.port = portToSet;\n+      fsExtra.outputFileSync(`${env.templates.config}`, JSON.stringify(config, null, 2));\n+    }\n+\n+    // Setup the database connection","path":"lib/actions/artisan.js","position":36,"original_position":36,"commit_id":"46dfcb686eceaec1007c2de0eab2a5f76c12ae88","original_commit_id":"46dfcb686eceaec1007c2de0eab2a5f76c12ae88","user":{"login":"thinkholic","id":1164024,"avatar_url":"https://avatars1.githubusercontent.com/u/1164024?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkholic","html_url":"https://github.com/thinkholic","followers_url":"https://api.github.com/users/thinkholic/followers","following_url":"https://api.github.com/users/thinkholic/following{/other_user}","gists_url":"https://api.github.com/users/thinkholic/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkholic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkholic/subscriptions","organizations_url":"https://api.github.com/users/thinkholic/orgs","repos_url":"https://api.github.com/users/thinkholic/repos","events_url":"https://api.github.com/users/thinkholic/events{/privacy}","received_events_url":"https://api.github.com/users/thinkholic/received_events","type":"User","site_admin":false},"body":"How about moving this logic into `actions/db.js`?\r\nWe can add new method as `db.queryExec()` or like that.","created_at":"2017-03-01T03:03:11Z","updated_at":"2017-03-01T03:03:11Z","html_url":"https://github.com/kodeflex/wp-artisan/pull/4#discussion_r103602350","pull_request_url":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/comments/103602350"},"html":{"href":"https://github.com/kodeflex/wp-artisan/pull/4#discussion_r103602350"},"pull_request":{"href":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/4","id":108457516,"html_url":"https://github.com/kodeflex/wp-artisan/pull/4","diff_url":"https://github.com/kodeflex/wp-artisan/pull/4.diff","patch_url":"https://github.com/kodeflex/wp-artisan/pull/4.patch","issue_url":"https://api.github.com/repos/kodeflex/wp-artisan/issues/4","number":4,"state":"open","locked":false,"title":"Serve on custom port","user":{"login":"THPubs","id":1212023,"avatar_url":"https://avatars0.githubusercontent.com/u/1212023?v=3","gravatar_id":"","url":"https://api.github.com/users/THPubs","html_url":"https://github.com/THPubs","followers_url":"https://api.github.com/users/THPubs/followers","following_url":"https://api.github.com/users/THPubs/following{/other_user}","gists_url":"https://api.github.com/users/THPubs/gists{/gist_id}","starred_url":"https://api.github.com/users/THPubs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/THPubs/subscriptions","organizations_url":"https://api.github.com/users/THPubs/orgs","repos_url":"https://api.github.com/users/THPubs/repos","events_url":"https://api.github.com/users/THPubs/events{/privacy}","received_events_url":"https://api.github.com/users/THPubs/received_events","type":"User","site_admin":false},"body":"Added the custom port configuration according to #2 !","created_at":"2017-03-01T02:53:55Z","updated_at":"2017-03-01T03:03:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18d44ba675231780432d02d8e7f3ea0a73ee99f5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/4/commits","review_comments_url":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/4/comments","review_comment_url":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kodeflex/wp-artisan/issues/4/comments","statuses_url":"https://api.github.com/repos/kodeflex/wp-artisan/statuses/46dfcb686eceaec1007c2de0eab2a5f76c12ae88","head":{"label":"kodeflex:serve_on_custom_port","ref":"serve_on_custom_port","sha":"46dfcb686eceaec1007c2de0eab2a5f76c12ae88","user":{"login":"kodeflex","id":25581793,"avatar_url":"https://avatars2.githubusercontent.com/u/25581793?v=3","gravatar_id":"","url":"https://api.github.com/users/kodeflex","html_url":"https://github.com/kodeflex","followers_url":"https://api.github.com/users/kodeflex/followers","following_url":"https://api.github.com/users/kodeflex/following{/other_user}","gists_url":"https://api.github.com/users/kodeflex/gists{/gist_id}","starred_url":"https://api.github.com/users/kodeflex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kodeflex/subscriptions","organizations_url":"https://api.github.com/users/kodeflex/orgs","repos_url":"https://api.github.com/users/kodeflex/repos","events_url":"https://api.github.com/users/kodeflex/events{/privacy}","received_events_url":"https://api.github.com/users/kodeflex/received_events","type":"Organization","site_admin":false},"repo":{"id":83309837,"name":"wp-artisan","full_name":"kodeflex/wp-artisan","owner":{"login":"kodeflex","id":25581793,"avatar_url":"https://avatars2.githubusercontent.com/u/25581793?v=3","gravatar_id":"","url":"https://api.github.com/users/kodeflex","html_url":"https://github.com/kodeflex","followers_url":"https://api.github.com/users/kodeflex/followers","following_url":"https://api.github.com/users/kodeflex/following{/other_user}","gists_url":"https://api.github.com/users/kodeflex/gists{/gist_id}","starred_url":"https://api.github.com/users/kodeflex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kodeflex/subscriptions","organizations_url":"https://api.github.com/users/kodeflex/orgs","repos_url":"https://api.github.com/users/kodeflex/repos","events_url":"https://api.github.com/users/kodeflex/events{/privacy}","received_events_url":"https://api.github.com/users/kodeflex/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kodeflex/wp-artisan","description":"A command-line toolkit for WordPress developers","fork":false,"url":"https://api.github.com/repos/kodeflex/wp-artisan","forks_url":"https://api.github.com/repos/kodeflex/wp-artisan/forks","keys_url":"https://api.github.com/repos/kodeflex/wp-artisan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kodeflex/wp-artisan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kodeflex/wp-artisan/teams","hooks_url":"https://api.github.com/repos/kodeflex/wp-artisan/hooks","issue_events_url":"https://api.github.com/repos/kodeflex/wp-artisan/issues/events{/number}","events_url":"https://api.github.com/repos/kodeflex/wp-artisan/events","assignees_url":"https://api.github.com/repos/kodeflex/wp-artisan/assignees{/user}","branches_url":"https://api.github.com/repos/kodeflex/wp-artisan/branches{/branch}","tags_url":"https://api.github.com/repos/kodeflex/wp-artisan/tags","blobs_url":"https://api.github.com/repos/kodeflex/wp-artisan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kodeflex/wp-artisan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kodeflex/wp-artisan/git/refs{/sha}","trees_url":"https://api.github.com/repos/kodeflex/wp-artisan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kodeflex/wp-artisan/statuses/{sha}","languages_url":"https://api.github.com/repos/kodeflex/wp-artisan/languages","stargazers_url":"https://api.github.com/repos/kodeflex/wp-artisan/stargazers","contributors_url":"https://api.github.com/repos/kodeflex/wp-artisan/contributors","subscribers_url":"https://api.github.com/repos/kodeflex/wp-artisan/subscribers","subscription_url":"https://api.github.com/repos/kodeflex/wp-artisan/subscription","commits_url":"https://api.github.com/repos/kodeflex/wp-artisan/commits{/sha}","git_commits_url":"https://api.github.com/repos/kodeflex/wp-artisan/git/commits{/sha}","comments_url":"https://api.github.com/repos/kodeflex/wp-artisan/comments{/number}","issue_comment_url":"https://api.github.com/repos/kodeflex/wp-artisan/issues/comments{/number}","contents_url":"https://api.github.com/repos/kodeflex/wp-artisan/contents/{+path}","compare_url":"https://api.github.com/repos/kodeflex/wp-artisan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kodeflex/wp-artisan/merges","archive_url":"https://api.github.com/repos/kodeflex/wp-artisan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kodeflex/wp-artisan/downloads","issues_url":"https://api.github.com/repos/kodeflex/wp-artisan/issues{/number}","pulls_url":"https://api.github.com/repos/kodeflex/wp-artisan/pulls{/number}","milestones_url":"https://api.github.com/repos/kodeflex/wp-artisan/milestones{/number}","notifications_url":"https://api.github.com/repos/kodeflex/wp-artisan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kodeflex/wp-artisan/labels{/name}","releases_url":"https://api.github.com/repos/kodeflex/wp-artisan/releases{/id}","deployments_url":"https://api.github.com/repos/kodeflex/wp-artisan/deployments","created_at":"2017-02-27T12:50:37Z","updated_at":"2017-02-28T04:07:21Z","pushed_at":"2017-03-01T02:53:55Z","git_url":"git://github.com/kodeflex/wp-artisan.git","ssh_url":"git@github.com:kodeflex/wp-artisan.git","clone_url":"https://github.com/kodeflex/wp-artisan.git","svn_url":"https://github.com/kodeflex/wp-artisan","homepage":"","size":55,"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":3,"forks":1,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"kodeflex:dev","ref":"dev","sha":"64725c837ab3e516fd88554acabb0d040e1c9e55","user":{"login":"kodeflex","id":25581793,"avatar_url":"https://avatars2.githubusercontent.com/u/25581793?v=3","gravatar_id":"","url":"https://api.github.com/users/kodeflex","html_url":"https://github.com/kodeflex","followers_url":"https://api.github.com/users/kodeflex/followers","following_url":"https://api.github.com/users/kodeflex/following{/other_user}","gists_url":"https://api.github.com/users/kodeflex/gists{/gist_id}","starred_url":"https://api.github.com/users/kodeflex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kodeflex/subscriptions","organizations_url":"https://api.github.com/users/kodeflex/orgs","repos_url":"https://api.github.com/users/kodeflex/repos","events_url":"https://api.github.com/users/kodeflex/events{/privacy}","received_events_url":"https://api.github.com/users/kodeflex/received_events","type":"Organization","site_admin":false},"repo":{"id":83309837,"name":"wp-artisan","full_name":"kodeflex/wp-artisan","owner":{"login":"kodeflex","id":25581793,"avatar_url":"https://avatars2.githubusercontent.com/u/25581793?v=3","gravatar_id":"","url":"https://api.github.com/users/kodeflex","html_url":"https://github.com/kodeflex","followers_url":"https://api.github.com/users/kodeflex/followers","following_url":"https://api.github.com/users/kodeflex/following{/other_user}","gists_url":"https://api.github.com/users/kodeflex/gists{/gist_id}","starred_url":"https://api.github.com/users/kodeflex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kodeflex/subscriptions","organizations_url":"https://api.github.com/users/kodeflex/orgs","repos_url":"https://api.github.com/users/kodeflex/repos","events_url":"https://api.github.com/users/kodeflex/events{/privacy}","received_events_url":"https://api.github.com/users/kodeflex/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kodeflex/wp-artisan","description":"A command-line toolkit for WordPress developers","fork":false,"url":"https://api.github.com/repos/kodeflex/wp-artisan","forks_url":"https://api.github.com/repos/kodeflex/wp-artisan/forks","keys_url":"https://api.github.com/repos/kodeflex/wp-artisan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kodeflex/wp-artisan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kodeflex/wp-artisan/teams","hooks_url":"https://api.github.com/repos/kodeflex/wp-artisan/hooks","issue_events_url":"https://api.github.com/repos/kodeflex/wp-artisan/issues/events{/number}","events_url":"https://api.github.com/repos/kodeflex/wp-artisan/events","assignees_url":"https://api.github.com/repos/kodeflex/wp-artisan/assignees{/user}","branches_url":"https://api.github.com/repos/kodeflex/wp-artisan/branches{/branch}","tags_url":"https://api.github.com/repos/kodeflex/wp-artisan/tags","blobs_url":"https://api.github.com/repos/kodeflex/wp-artisan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kodeflex/wp-artisan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kodeflex/wp-artisan/git/refs{/sha}","trees_url":"https://api.github.com/repos/kodeflex/wp-artisan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kodeflex/wp-artisan/statuses/{sha}","languages_url":"https://api.github.com/repos/kodeflex/wp-artisan/languages","stargazers_url":"https://api.github.com/repos/kodeflex/wp-artisan/stargazers","contributors_url":"https://api.github.com/repos/kodeflex/wp-artisan/contributors","subscribers_url":"https://api.github.com/repos/kodeflex/wp-artisan/subscribers","subscription_url":"https://api.github.com/repos/kodeflex/wp-artisan/subscription","commits_url":"https://api.github.com/repos/kodeflex/wp-artisan/commits{/sha}","git_commits_url":"https://api.github.com/repos/kodeflex/wp-artisan/git/commits{/sha}","comments_url":"https://api.github.com/repos/kodeflex/wp-artisan/comments{/number}","issue_comment_url":"https://api.github.com/repos/kodeflex/wp-artisan/issues/comments{/number}","contents_url":"https://api.github.com/repos/kodeflex/wp-artisan/contents/{+path}","compare_url":"https://api.github.com/repos/kodeflex/wp-artisan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kodeflex/wp-artisan/merges","archive_url":"https://api.github.com/repos/kodeflex/wp-artisan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kodeflex/wp-artisan/downloads","issues_url":"https://api.github.com/repos/kodeflex/wp-artisan/issues{/number}","pulls_url":"https://api.github.com/repos/kodeflex/wp-artisan/pulls{/number}","milestones_url":"https://api.github.com/repos/kodeflex/wp-artisan/milestones{/number}","notifications_url":"https://api.github.com/repos/kodeflex/wp-artisan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kodeflex/wp-artisan/labels{/name}","releases_url":"https://api.github.com/repos/kodeflex/wp-artisan/releases{/id}","deployments_url":"https://api.github.com/repos/kodeflex/wp-artisan/deployments","created_at":"2017-02-27T12:50:37Z","updated_at":"2017-02-28T04:07:21Z","pushed_at":"2017-03-01T02:53:55Z","git_url":"git://github.com/kodeflex/wp-artisan.git","ssh_url":"git@github.com:kodeflex/wp-artisan.git","clone_url":"https://github.com/kodeflex/wp-artisan.git","svn_url":"https://github.com/kodeflex/wp-artisan","homepage":"","size":55,"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":3,"forks":1,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/4"},"html":{"href":"https://github.com/kodeflex/wp-artisan/pull/4"},"issue":{"href":"https://api.github.com/repos/kodeflex/wp-artisan/issues/4"},"comments":{"href":"https://api.github.com/repos/kodeflex/wp-artisan/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kodeflex/wp-artisan/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/kodeflex/wp-artisan/statuses/46dfcb686eceaec1007c2de0eab2a5f76c12ae88"}}}}
{"actor":{"display_login":"thinkholic"}}