{"action":"created","comment":{"url":"https://api.github.com/repos/fastify/fastify/pulls/comments/195901753","pull_request_review_id":129362025,"id":195901753,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTkwMTc1Mw==","diff_hunk":"@@ -23,7 +23,7 @@ fastify\n       .send({ hello: 'world' })\n   })\n \n-fastify.listen(3000, err => {\n+fastify.listen(3000, (err, address) => {\n   if (err) throw err\n-  console.log(`server listening on ${fastify.server.address().port}`)\n+  console.log(`server listening on ${address}`)","path":"examples/simple.js","position":null,"original_position":8,"commit_id":"0b80c048cc05af604e0d2c7a80017c346076520e","original_commit_id":"6f3206fa7ad8a6ed179b8487d19f32a6074284a4","user":{"login":"rjoydip","id":15318294,"node_id":"MDQ6VXNlcjE1MzE4Mjk0","avatar_url":"https://avatars1.githubusercontent.com/u/15318294?v=4","gravatar_id":"","url":"https://api.github.com/users/rjoydip","html_url":"https://github.com/rjoydip","followers_url":"https://api.github.com/users/rjoydip/followers","following_url":"https://api.github.com/users/rjoydip/following{/other_user}","gists_url":"https://api.github.com/users/rjoydip/gists{/gist_id}","starred_url":"https://api.github.com/users/rjoydip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjoydip/subscriptions","organizations_url":"https://api.github.com/users/rjoydip/orgs","repos_url":"https://api.github.com/users/rjoydip/repos","events_url":"https://api.github.com/users/rjoydip/events{/privacy}","received_events_url":"https://api.github.com/users/rjoydip/received_events","type":"User","site_admin":false},"body":"fixed","created_at":"2018-06-16T12:13:00Z","updated_at":"2018-06-16T12:13:00Z","html_url":"https://github.com/fastify/fastify/pull/964#discussion_r195901753","pull_request_url":"https://api.github.com/repos/fastify/fastify/pulls/964","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/fastify/fastify/pulls/comments/195901753"},"html":{"href":"https://github.com/fastify/fastify/pull/964#discussion_r195901753"},"pull_request":{"href":"https://api.github.com/repos/fastify/fastify/pulls/964"}},"in_reply_to_id":195901300},"pull_request":{"url":"https://api.github.com/repos/fastify/fastify/pulls/964","id":193759945,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNzU5OTQ1","html_url":"https://github.com/fastify/fastify/pull/964","diff_url":"https://github.com/fastify/fastify/pull/964.diff","patch_url":"https://github.com/fastify/fastify/pull/964.patch","issue_url":"https://api.github.com/repos/fastify/fastify/issues/964","number":964,"state":"open","locked":false,"title":"fix(): return url from listen method","user":{"login":"rjoydip","id":15318294,"node_id":"MDQ6VXNlcjE1MzE4Mjk0","avatar_url":"https://avatars1.githubusercontent.com/u/15318294?v=4","gravatar_id":"","url":"https://api.github.com/users/rjoydip","html_url":"https://github.com/rjoydip","followers_url":"https://api.github.com/users/rjoydip/followers","following_url":"https://api.github.com/users/rjoydip/following{/other_user}","gists_url":"https://api.github.com/users/rjoydip/gists{/gist_id}","starred_url":"https://api.github.com/users/rjoydip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjoydip/subscriptions","organizations_url":"https://api.github.com/users/rjoydip/orgs","repos_url":"https://api.github.com/users/rjoydip/repos","events_url":"https://api.github.com/users/rjoydip/events{/privacy}","received_events_url":"https://api.github.com/users/rjoydip/received_events","type":"User","site_admin":false},"body":"Full URL address can be passed in `fastify.listen()`. If listen() is a promise then address passed through resolve method or if it is a callback then passed along with an error. Fixed #875 \r\n\r\nNote: Missing \"listen on socket\" test. Same as previously closed PR #926. Special thanks @allevo, @mcollina, @jsumners, @delvedor \r\n\r\n### Example\r\n```js\r\nfastify.listen(3000, '127.0.0.1')\r\n  .then(address) => /* do whatever */)\r\n  .catch(error) => /* error */);\r\n```\r\nor\r\n```js\r\nfastify.listen(3000, '127.0.0.1', (err, address) => /* do whatever */);\r\n```\r\n\r\n#### Checklist\r\n\r\n- [x] run `npm run test` and `npm run benchmark`\r\n- [x] documentation is changed or added\r\n- [x] tests are included\r\n- [x] commit message and code follows [Code of conduct](https://github.com/fastify/fastify/blob/master/CODE_OF_CONDUCT.md)","created_at":"2018-06-09T05:38:33Z","updated_at":"2018-06-16T12:13:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d3f980dadc2052b8957cefc66142ffdd5749633","assignee":null,"assignees":[],"requested_reviewers":[{"login":"allevo","id":1054125,"node_id":"MDQ6VXNlcjEwNTQxMjU=","avatar_url":"https://avatars1.githubusercontent.com/u/1054125?v=4","gravatar_id":"","url":"https://api.github.com/users/allevo","html_url":"https://github.com/allevo","followers_url":"https://api.github.com/users/allevo/followers","following_url":"https://api.github.com/users/allevo/following{/other_user}","gists_url":"https://api.github.com/users/allevo/gists{/gist_id}","starred_url":"https://api.github.com/users/allevo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allevo/subscriptions","organizations_url":"https://api.github.com/users/allevo/orgs","repos_url":"https://api.github.com/users/allevo/repos","events_url":"https://api.github.com/users/allevo/events{/privacy}","received_events_url":"https://api.github.com/users/allevo/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fastify/fastify/pulls/964/commits","review_comments_url":"https://api.github.com/repos/fastify/fastify/pulls/964/comments","review_comment_url":"https://api.github.com/repos/fastify/fastify/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastify/fastify/issues/964/comments","statuses_url":"https://api.github.com/repos/fastify/fastify/statuses/0b80c048cc05af604e0d2c7a80017c346076520e","head":{"label":"rjoydip:url-listen","ref":"url-listen","sha":"0b80c048cc05af604e0d2c7a80017c346076520e","user":{"login":"rjoydip","id":15318294,"node_id":"MDQ6VXNlcjE1MzE4Mjk0","avatar_url":"https://avatars1.githubusercontent.com/u/15318294?v=4","gravatar_id":"","url":"https://api.github.com/users/rjoydip","html_url":"https://github.com/rjoydip","followers_url":"https://api.github.com/users/rjoydip/followers","following_url":"https://api.github.com/users/rjoydip/following{/other_user}","gists_url":"https://api.github.com/users/rjoydip/gists{/gist_id}","starred_url":"https://api.github.com/users/rjoydip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjoydip/subscriptions","organizations_url":"https://api.github.com/users/rjoydip/orgs","repos_url":"https://api.github.com/users/rjoydip/repos","events_url":"https://api.github.com/users/rjoydip/events{/privacy}","received_events_url":"https://api.github.com/users/rjoydip/received_events","type":"User","site_admin":false},"repo":{"id":136689322,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY2ODkzMjI=","name":"fastify","full_name":"rjoydip/fastify","owner":{"login":"rjoydip","id":15318294,"node_id":"MDQ6VXNlcjE1MzE4Mjk0","avatar_url":"https://avatars1.githubusercontent.com/u/15318294?v=4","gravatar_id":"","url":"https://api.github.com/users/rjoydip","html_url":"https://github.com/rjoydip","followers_url":"https://api.github.com/users/rjoydip/followers","following_url":"https://api.github.com/users/rjoydip/following{/other_user}","gists_url":"https://api.github.com/users/rjoydip/gists{/gist_id}","starred_url":"https://api.github.com/users/rjoydip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjoydip/subscriptions","organizations_url":"https://api.github.com/users/rjoydip/orgs","repos_url":"https://api.github.com/users/rjoydip/repos","events_url":"https://api.github.com/users/rjoydip/events{/privacy}","received_events_url":"https://api.github.com/users/rjoydip/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rjoydip/fastify","description":"Fast and low overhead web framework, for Node.js","fork":true,"url":"https://api.github.com/repos/rjoydip/fastify","forks_url":"https://api.github.com/repos/rjoydip/fastify/forks","keys_url":"https://api.github.com/repos/rjoydip/fastify/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rjoydip/fastify/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rjoydip/fastify/teams","hooks_url":"https://api.github.com/repos/rjoydip/fastify/hooks","issue_events_url":"https://api.github.com/repos/rjoydip/fastify/issues/events{/number}","events_url":"https://api.github.com/repos/rjoydip/fastify/events","assignees_url":"https://api.github.com/repos/rjoydip/fastify/assignees{/user}","branches_url":"https://api.github.com/repos/rjoydip/fastify/branches{/branch}","tags_url":"https://api.github.com/repos/rjoydip/fastify/tags","blobs_url":"https://api.github.com/repos/rjoydip/fastify/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rjoydip/fastify/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rjoydip/fastify/git/refs{/sha}","trees_url":"https://api.github.com/repos/rjoydip/fastify/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rjoydip/fastify/statuses/{sha}","languages_url":"https://api.github.com/repos/rjoydip/fastify/languages","stargazers_url":"https://api.github.com/repos/rjoydip/fastify/stargazers","contributors_url":"https://api.github.com/repos/rjoydip/fastify/contributors","subscribers_url":"https://api.github.com/repos/rjoydip/fastify/subscribers","subscription_url":"https://api.github.com/repos/rjoydip/fastify/subscription","commits_url":"https://api.github.com/repos/rjoydip/fastify/commits{/sha}","git_commits_url":"https://api.github.com/repos/rjoydip/fastify/git/commits{/sha}","comments_url":"https://api.github.com/repos/rjoydip/fastify/comments{/number}","issue_comment_url":"https://api.github.com/repos/rjoydip/fastify/issues/comments{/number}","contents_url":"https://api.github.com/repos/rjoydip/fastify/contents/{+path}","compare_url":"https://api.github.com/repos/rjoydip/fastify/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rjoydip/fastify/merges","archive_url":"https://api.github.com/repos/rjoydip/fastify/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rjoydip/fastify/downloads","issues_url":"https://api.github.com/repos/rjoydip/fastify/issues{/number}","pulls_url":"https://api.github.com/repos/rjoydip/fastify/pulls{/number}","milestones_url":"https://api.github.com/repos/rjoydip/fastify/milestones{/number}","notifications_url":"https://api.github.com/repos/rjoydip/fastify/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rjoydip/fastify/labels{/name}","releases_url":"https://api.github.com/repos/rjoydip/fastify/releases{/id}","deployments_url":"https://api.github.com/repos/rjoydip/fastify/deployments","created_at":"2018-06-09T04:02:49Z","updated_at":"2018-06-09T04:02:51Z","pushed_at":"2018-06-16T12:08:00Z","git_url":"git://github.com/rjoydip/fastify.git","ssh_url":"git@github.com:rjoydip/fastify.git","clone_url":"https://github.com/rjoydip/fastify.git","svn_url":"https://github.com/rjoydip/fastify","homepage":"https://www.fastify.io","size":1539,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fastify:master","ref":"master","sha":"f945e06fc0b01831189a512d1cb003320dc6e3d7","user":{"login":"fastify","id":24939410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0OTM5NDEw","avatar_url":"https://avatars3.githubusercontent.com/u/24939410?v=4","gravatar_id":"","url":"https://api.github.com/users/fastify","html_url":"https://github.com/fastify","followers_url":"https://api.github.com/users/fastify/followers","following_url":"https://api.github.com/users/fastify/following{/other_user}","gists_url":"https://api.github.com/users/fastify/gists{/gist_id}","starred_url":"https://api.github.com/users/fastify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastify/subscriptions","organizations_url":"https://api.github.com/users/fastify/orgs","repos_url":"https://api.github.com/users/fastify/repos","events_url":"https://api.github.com/users/fastify/events{/privacy}","received_events_url":"https://api.github.com/users/fastify/received_events","type":"Organization","site_admin":false},"repo":{"id":69495170,"node_id":"MDEwOlJlcG9zaXRvcnk2OTQ5NTE3MA==","name":"fastify","full_name":"fastify/fastify","owner":{"login":"fastify","id":24939410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0OTM5NDEw","avatar_url":"https://avatars3.githubusercontent.com/u/24939410?v=4","gravatar_id":"","url":"https://api.github.com/users/fastify","html_url":"https://github.com/fastify","followers_url":"https://api.github.com/users/fastify/followers","following_url":"https://api.github.com/users/fastify/following{/other_user}","gists_url":"https://api.github.com/users/fastify/gists{/gist_id}","starred_url":"https://api.github.com/users/fastify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastify/subscriptions","organizations_url":"https://api.github.com/users/fastify/orgs","repos_url":"https://api.github.com/users/fastify/repos","events_url":"https://api.github.com/users/fastify/events{/privacy}","received_events_url":"https://api.github.com/users/fastify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastify/fastify","description":"Fast and low overhead web framework, for Node.js","fork":false,"url":"https://api.github.com/repos/fastify/fastify","forks_url":"https://api.github.com/repos/fastify/fastify/forks","keys_url":"https://api.github.com/repos/fastify/fastify/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastify/fastify/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastify/fastify/teams","hooks_url":"https://api.github.com/repos/fastify/fastify/hooks","issue_events_url":"https://api.github.com/repos/fastify/fastify/issues/events{/number}","events_url":"https://api.github.com/repos/fastify/fastify/events","assignees_url":"https://api.github.com/repos/fastify/fastify/assignees{/user}","branches_url":"https://api.github.com/repos/fastify/fastify/branches{/branch}","tags_url":"https://api.github.com/repos/fastify/fastify/tags","blobs_url":"https://api.github.com/repos/fastify/fastify/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastify/fastify/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastify/fastify/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastify/fastify/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastify/fastify/statuses/{sha}","languages_url":"https://api.github.com/repos/fastify/fastify/languages","stargazers_url":"https://api.github.com/repos/fastify/fastify/stargazers","contributors_url":"https://api.github.com/repos/fastify/fastify/contributors","subscribers_url":"https://api.github.com/repos/fastify/fastify/subscribers","subscription_url":"https://api.github.com/repos/fastify/fastify/subscription","commits_url":"https://api.github.com/repos/fastify/fastify/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastify/fastify/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastify/fastify/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastify/fastify/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastify/fastify/contents/{+path}","compare_url":"https://api.github.com/repos/fastify/fastify/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastify/fastify/merges","archive_url":"https://api.github.com/repos/fastify/fastify/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastify/fastify/downloads","issues_url":"https://api.github.com/repos/fastify/fastify/issues{/number}","pulls_url":"https://api.github.com/repos/fastify/fastify/pulls{/number}","milestones_url":"https://api.github.com/repos/fastify/fastify/milestones{/number}","notifications_url":"https://api.github.com/repos/fastify/fastify/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastify/fastify/labels{/name}","releases_url":"https://api.github.com/repos/fastify/fastify/releases{/id}","deployments_url":"https://api.github.com/repos/fastify/fastify/deployments","created_at":"2016-09-28T19:10:14Z","updated_at":"2018-06-16T11:59:47Z","pushed_at":"2018-06-16T12:08:02Z","git_url":"git://github.com/fastify/fastify.git","ssh_url":"git@github.com:fastify/fastify.git","clone_url":"https://github.com/fastify/fastify.git","svn_url":"https://github.com/fastify/fastify","homepage":"https://www.fastify.io","size":1532,"stargazers_count":7306,"watchers_count":7306,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":380,"mirror_url":null,"archived":false,"open_issues_count":37,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":380,"open_issues":37,"watchers":7306,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastify/fastify/pulls/964"},"html":{"href":"https://github.com/fastify/fastify/pull/964"},"issue":{"href":"https://api.github.com/repos/fastify/fastify/issues/964"},"comments":{"href":"https://api.github.com/repos/fastify/fastify/issues/964/comments"},"review_comments":{"href":"https://api.github.com/repos/fastify/fastify/pulls/964/comments"},"review_comment":{"href":"https://api.github.com/repos/fastify/fastify/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastify/fastify/pulls/964/commits"},"statuses":{"href":"https://api.github.com/repos/fastify/fastify/statuses/0b80c048cc05af604e0d2c7a80017c346076520e"}},"author_association":"NONE"}}
{"actor":{"display_login":"rjoydip"}}