{"action":"created","comment":{"url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/comments/46832124","id":46832124,"diff_hunk":"@@ -0,0 +1,20 @@\n+var express = require('express')\n+//get express module\n+var path = require('path')\n+//get path module\n+var app = express()\n+//define express as an app\n+app.use(express.static(process.argv[3] || path.join(__dirname, 'public')))\n+//use app via express to serve static files ** Could you explain the remaining syntax?\n+var server = app.listen(process.argv[2], function () {\n+//on command node ****.js initiate server, app wait for req and perform {} command lines ** process.argv[2] refers to?\n+  var host = server.address().address\n+//define host server address, since it is (), does it refer to localhost by default? url 168.192.1.1","path":"express/Question1","position":12,"original_position":12,"commit_id":"353ba24d8f11e21c17cb4fd19abccb3cba969fbd","original_commit_id":"353ba24d8f11e21c17cb4fd19abccb3cba969fbd","user":{"login":"cbas","id":78718,"avatar_url":"https://avatars.githubusercontent.com/u/78718?v=3","gravatar_id":"","url":"https://api.github.com/users/cbas","html_url":"https://github.com/cbas","followers_url":"https://api.github.com/users/cbas/followers","following_url":"https://api.github.com/users/cbas/following{/other_user}","gists_url":"https://api.github.com/users/cbas/gists{/gist_id}","starred_url":"https://api.github.com/users/cbas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbas/subscriptions","organizations_url":"https://api.github.com/users/cbas/orgs","repos_url":"https://api.github.com/users/cbas/repos","events_url":"https://api.github.com/users/cbas/events{/privacy}","received_events_url":"https://api.github.com/users/cbas/received_events","type":"User","site_admin":false},"body":"https://nodejs.org/api/net.html#net_server_address","created_at":"2015-12-07T15:23:35Z","updated_at":"2015-12-07T15:23:35Z","html_url":"https://github.com/RoyKoh/wdi-sg-playground/pull/1#discussion_r46832124","pull_request_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/comments/46832124"},"html":{"href":"https://github.com/RoyKoh/wdi-sg-playground/pull/1#discussion_r46832124"},"pull_request":{"href":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/1","id":52842800,"html_url":"https://github.com/RoyKoh/wdi-sg-playground/pull/1","diff_url":"https://github.com/RoyKoh/wdi-sg-playground/pull/1.diff","patch_url":"https://github.com/RoyKoh/wdi-sg-playground/pull/1.patch","issue_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/issues/1","number":1,"state":"open","locked":false,"title":"@cbas Comment explain codes for functional javascript","user":{"login":"RoyKoh","id":15260841,"avatar_url":"https://avatars.githubusercontent.com/u/15260841?v=3","gravatar_id":"","url":"https://api.github.com/users/RoyKoh","html_url":"https://github.com/RoyKoh","followers_url":"https://api.github.com/users/RoyKoh/followers","following_url":"https://api.github.com/users/RoyKoh/following{/other_user}","gists_url":"https://api.github.com/users/RoyKoh/gists{/gist_id}","starred_url":"https://api.github.com/users/RoyKoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoyKoh/subscriptions","organizations_url":"https://api.github.com/users/RoyKoh/orgs","repos_url":"https://api.github.com/users/RoyKoh/repos","events_url":"https://api.github.com/users/RoyKoh/events{/privacy}","received_events_url":"https://api.github.com/users/RoyKoh/received_events","type":"User","site_admin":false},"body":"@cbas dear Seb, \r\n\r\nUnder test branch functionaljavascriptQuestion1\r\n\r\n","created_at":"2015-12-07T13:14:09Z","updated_at":"2015-12-07T15:23:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9f1ffb8d809241e7689a22e975bde1762550b2b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/1/commits","review_comments_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/1/comments","review_comment_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/issues/1/comments","statuses_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/statuses/353ba24d8f11e21c17cb4fd19abccb3cba969fbd","head":{"label":"RoyKoh:test","ref":"test","sha":"353ba24d8f11e21c17cb4fd19abccb3cba969fbd","user":{"login":"RoyKoh","id":15260841,"avatar_url":"https://avatars.githubusercontent.com/u/15260841?v=3","gravatar_id":"","url":"https://api.github.com/users/RoyKoh","html_url":"https://github.com/RoyKoh","followers_url":"https://api.github.com/users/RoyKoh/followers","following_url":"https://api.github.com/users/RoyKoh/following{/other_user}","gists_url":"https://api.github.com/users/RoyKoh/gists{/gist_id}","starred_url":"https://api.github.com/users/RoyKoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoyKoh/subscriptions","organizations_url":"https://api.github.com/users/RoyKoh/orgs","repos_url":"https://api.github.com/users/RoyKoh/repos","events_url":"https://api.github.com/users/RoyKoh/events{/privacy}","received_events_url":"https://api.github.com/users/RoyKoh/received_events","type":"User","site_admin":false},"repo":{"id":45507530,"name":"wdi-sg-playground","full_name":"RoyKoh/wdi-sg-playground","owner":{"login":"RoyKoh","id":15260841,"avatar_url":"https://avatars.githubusercontent.com/u/15260841?v=3","gravatar_id":"","url":"https://api.github.com/users/RoyKoh","html_url":"https://github.com/RoyKoh","followers_url":"https://api.github.com/users/RoyKoh/followers","following_url":"https://api.github.com/users/RoyKoh/following{/other_user}","gists_url":"https://api.github.com/users/RoyKoh/gists{/gist_id}","starred_url":"https://api.github.com/users/RoyKoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoyKoh/subscriptions","organizations_url":"https://api.github.com/users/RoyKoh/orgs","repos_url":"https://api.github.com/users/RoyKoh/repos","events_url":"https://api.github.com/users/RoyKoh/events{/privacy}","received_events_url":"https://api.github.com/users/RoyKoh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RoyKoh/wdi-sg-playground","description":"RoyKoh","fork":false,"url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground","forks_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/forks","keys_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/teams","hooks_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/hooks","issue_events_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/issues/events{/number}","events_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/events","assignees_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/assignees{/user}","branches_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/branches{/branch}","tags_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/tags","blobs_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/git/refs{/sha}","trees_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/statuses/{sha}","languages_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/languages","stargazers_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/stargazers","contributors_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/contributors","subscribers_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/subscribers","subscription_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/subscription","commits_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/commits{/sha}","git_commits_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/git/commits{/sha}","comments_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/comments{/number}","issue_comment_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/issues/comments{/number}","contents_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/contents/{+path}","compare_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/merges","archive_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/downloads","issues_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/issues{/number}","pulls_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls{/number}","milestones_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/milestones{/number}","notifications_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/labels{/name}","releases_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/releases{/id}","created_at":"2015-11-04T01:37:11Z","updated_at":"2015-11-11T09:20:26Z","pushed_at":"2015-12-07T14:36:00Z","git_url":"git://github.com/RoyKoh/wdi-sg-playground.git","ssh_url":"git@github.com:RoyKoh/wdi-sg-playground.git","clone_url":"https://github.com/RoyKoh/wdi-sg-playground.git","svn_url":"https://github.com/RoyKoh/wdi-sg-playground","homepage":null,"size":6305,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"RoyKoh:master","ref":"master","sha":"1d80b699c0f9dfa11d5c0abfbd1852e68b8fd80a","user":{"login":"RoyKoh","id":15260841,"avatar_url":"https://avatars.githubusercontent.com/u/15260841?v=3","gravatar_id":"","url":"https://api.github.com/users/RoyKoh","html_url":"https://github.com/RoyKoh","followers_url":"https://api.github.com/users/RoyKoh/followers","following_url":"https://api.github.com/users/RoyKoh/following{/other_user}","gists_url":"https://api.github.com/users/RoyKoh/gists{/gist_id}","starred_url":"https://api.github.com/users/RoyKoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoyKoh/subscriptions","organizations_url":"https://api.github.com/users/RoyKoh/orgs","repos_url":"https://api.github.com/users/RoyKoh/repos","events_url":"https://api.github.com/users/RoyKoh/events{/privacy}","received_events_url":"https://api.github.com/users/RoyKoh/received_events","type":"User","site_admin":false},"repo":{"id":45507530,"name":"wdi-sg-playground","full_name":"RoyKoh/wdi-sg-playground","owner":{"login":"RoyKoh","id":15260841,"avatar_url":"https://avatars.githubusercontent.com/u/15260841?v=3","gravatar_id":"","url":"https://api.github.com/users/RoyKoh","html_url":"https://github.com/RoyKoh","followers_url":"https://api.github.com/users/RoyKoh/followers","following_url":"https://api.github.com/users/RoyKoh/following{/other_user}","gists_url":"https://api.github.com/users/RoyKoh/gists{/gist_id}","starred_url":"https://api.github.com/users/RoyKoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoyKoh/subscriptions","organizations_url":"https://api.github.com/users/RoyKoh/orgs","repos_url":"https://api.github.com/users/RoyKoh/repos","events_url":"https://api.github.com/users/RoyKoh/events{/privacy}","received_events_url":"https://api.github.com/users/RoyKoh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RoyKoh/wdi-sg-playground","description":"RoyKoh","fork":false,"url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground","forks_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/forks","keys_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/teams","hooks_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/hooks","issue_events_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/issues/events{/number}","events_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/events","assignees_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/assignees{/user}","branches_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/branches{/branch}","tags_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/tags","blobs_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/git/refs{/sha}","trees_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/statuses/{sha}","languages_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/languages","stargazers_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/stargazers","contributors_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/contributors","subscribers_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/subscribers","subscription_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/subscription","commits_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/commits{/sha}","git_commits_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/git/commits{/sha}","comments_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/comments{/number}","issue_comment_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/issues/comments{/number}","contents_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/contents/{+path}","compare_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/merges","archive_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/downloads","issues_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/issues{/number}","pulls_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls{/number}","milestones_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/milestones{/number}","notifications_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/labels{/name}","releases_url":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/releases{/id}","created_at":"2015-11-04T01:37:11Z","updated_at":"2015-11-11T09:20:26Z","pushed_at":"2015-12-07T14:36:00Z","git_url":"git://github.com/RoyKoh/wdi-sg-playground.git","ssh_url":"git@github.com:RoyKoh/wdi-sg-playground.git","clone_url":"https://github.com/RoyKoh/wdi-sg-playground.git","svn_url":"https://github.com/RoyKoh/wdi-sg-playground","homepage":null,"size":6305,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/1"},"html":{"href":"https://github.com/RoyKoh/wdi-sg-playground/pull/1"},"issue":{"href":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/issues/1"},"comments":{"href":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/RoyKoh/wdi-sg-playground/statuses/353ba24d8f11e21c17cb4fd19abccb3cba969fbd"}}}}