{"action":"opened","number":4,"pull_request":{"url":"https://api.github.com/repos/jamhall/s3rver/pulls/4","id":44449278,"html_url":"https://github.com/jamhall/s3rver/pull/4","diff_url":"https://github.com/jamhall/s3rver/pull/4.diff","patch_url":"https://github.com/jamhall/s3rver/pull/4.patch","issue_url":"https://api.github.com/repos/jamhall/s3rver/issues/4","number":4,"state":"open","locked":false,"title":"Expose HTTP server to support calling `close`","user":{"login":"dhm116","id":371235,"avatar_url":"https://avatars.githubusercontent.com/u/371235?v=3","gravatar_id":"","url":"https://api.github.com/users/dhm116","html_url":"https://github.com/dhm116","followers_url":"https://api.github.com/users/dhm116/followers","following_url":"https://api.github.com/users/dhm116/following{/other_user}","gists_url":"https://api.github.com/users/dhm116/gists{/gist_id}","starred_url":"https://api.github.com/users/dhm116/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhm116/subscriptions","organizations_url":"https://api.github.com/users/dhm116/orgs","repos_url":"https://api.github.com/users/dhm116/repos","events_url":"https://api.github.com/users/dhm116/events{/privacy}","received_events_url":"https://api.github.com/users/dhm116/received_events","type":"User","site_admin":false},"body":"In order to support cleanly shutting down the express app after calling `run`, the result of calling express's `listen` method must be returned. This adds support for:\r\n\r\n```javascript\r\nvar server = s3rver\r\n      .setHostname('localhost')\r\n      .setPort(4568)\r\n      .setDirectory(S3_DIR)\r\n      .setSilent(true)\r\n      .run(function (err, host, port) {\r\n\r\n      });\r\n\r\nserver.close(function(err) {\r\n\r\n});\r\n```\r\n\r\nThis is a pretty essential feature during testing.","created_at":"2015-09-08T15:51:43Z","updated_at":"2015-09-08T15:51:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jamhall/s3rver/pulls/4/commits","review_comments_url":"https://api.github.com/repos/jamhall/s3rver/pulls/4/comments","review_comment_url":"https://api.github.com/repos/jamhall/s3rver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jamhall/s3rver/issues/4/comments","statuses_url":"https://api.github.com/repos/jamhall/s3rver/statuses/3b0e63d009d2e10c06bb135b3050b077aba24e22","head":{"label":"dhm116:feature-stop-server","ref":"feature-stop-server","sha":"3b0e63d009d2e10c06bb135b3050b077aba24e22","user":{"login":"dhm116","id":371235,"avatar_url":"https://avatars.githubusercontent.com/u/371235?v=3","gravatar_id":"","url":"https://api.github.com/users/dhm116","html_url":"https://github.com/dhm116","followers_url":"https://api.github.com/users/dhm116/followers","following_url":"https://api.github.com/users/dhm116/following{/other_user}","gists_url":"https://api.github.com/users/dhm116/gists{/gist_id}","starred_url":"https://api.github.com/users/dhm116/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhm116/subscriptions","organizations_url":"https://api.github.com/users/dhm116/orgs","repos_url":"https://api.github.com/users/dhm116/repos","events_url":"https://api.github.com/users/dhm116/events{/privacy}","received_events_url":"https://api.github.com/users/dhm116/received_events","type":"User","site_admin":false},"repo":{"id":42121688,"name":"s3rver","full_name":"dhm116/s3rver","owner":{"login":"dhm116","id":371235,"avatar_url":"https://avatars.githubusercontent.com/u/371235?v=3","gravatar_id":"","url":"https://api.github.com/users/dhm116","html_url":"https://github.com/dhm116","followers_url":"https://api.github.com/users/dhm116/followers","following_url":"https://api.github.com/users/dhm116/following{/other_user}","gists_url":"https://api.github.com/users/dhm116/gists{/gist_id}","starred_url":"https://api.github.com/users/dhm116/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhm116/subscriptions","organizations_url":"https://api.github.com/users/dhm116/orgs","repos_url":"https://api.github.com/users/dhm116/repos","events_url":"https://api.github.com/users/dhm116/events{/privacy}","received_events_url":"https://api.github.com/users/dhm116/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dhm116/s3rver","description":"A fake S3 server written in NodeJs","fork":true,"url":"https://api.github.com/repos/dhm116/s3rver","forks_url":"https://api.github.com/repos/dhm116/s3rver/forks","keys_url":"https://api.github.com/repos/dhm116/s3rver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhm116/s3rver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhm116/s3rver/teams","hooks_url":"https://api.github.com/repos/dhm116/s3rver/hooks","issue_events_url":"https://api.github.com/repos/dhm116/s3rver/issues/events{/number}","events_url":"https://api.github.com/repos/dhm116/s3rver/events","assignees_url":"https://api.github.com/repos/dhm116/s3rver/assignees{/user}","branches_url":"https://api.github.com/repos/dhm116/s3rver/branches{/branch}","tags_url":"https://api.github.com/repos/dhm116/s3rver/tags","blobs_url":"https://api.github.com/repos/dhm116/s3rver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhm116/s3rver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhm116/s3rver/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhm116/s3rver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhm116/s3rver/statuses/{sha}","languages_url":"https://api.github.com/repos/dhm116/s3rver/languages","stargazers_url":"https://api.github.com/repos/dhm116/s3rver/stargazers","contributors_url":"https://api.github.com/repos/dhm116/s3rver/contributors","subscribers_url":"https://api.github.com/repos/dhm116/s3rver/subscribers","subscription_url":"https://api.github.com/repos/dhm116/s3rver/subscription","commits_url":"https://api.github.com/repos/dhm116/s3rver/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhm116/s3rver/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhm116/s3rver/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhm116/s3rver/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhm116/s3rver/contents/{+path}","compare_url":"https://api.github.com/repos/dhm116/s3rver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhm116/s3rver/merges","archive_url":"https://api.github.com/repos/dhm116/s3rver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhm116/s3rver/downloads","issues_url":"https://api.github.com/repos/dhm116/s3rver/issues{/number}","pulls_url":"https://api.github.com/repos/dhm116/s3rver/pulls{/number}","milestones_url":"https://api.github.com/repos/dhm116/s3rver/milestones{/number}","notifications_url":"https://api.github.com/repos/dhm116/s3rver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhm116/s3rver/labels{/name}","releases_url":"https://api.github.com/repos/dhm116/s3rver/releases{/id}","created_at":"2015-09-08T15:33:34Z","updated_at":"2015-09-08T15:33:34Z","pushed_at":"2015-09-08T15:48:22Z","git_url":"git://github.com/dhm116/s3rver.git","ssh_url":"git@github.com:dhm116/s3rver.git","clone_url":"https://github.com/dhm116/s3rver.git","svn_url":"https://github.com/dhm116/s3rver","homepage":"","size":564,"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":"jamhall:master","ref":"master","sha":"08569f8decfb587dea39f6abb4dd3f831b1fde8f","user":{"login":"jamhall","id":368589,"avatar_url":"https://avatars.githubusercontent.com/u/368589?v=3","gravatar_id":"","url":"https://api.github.com/users/jamhall","html_url":"https://github.com/jamhall","followers_url":"https://api.github.com/users/jamhall/followers","following_url":"https://api.github.com/users/jamhall/following{/other_user}","gists_url":"https://api.github.com/users/jamhall/gists{/gist_id}","starred_url":"https://api.github.com/users/jamhall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamhall/subscriptions","organizations_url":"https://api.github.com/users/jamhall/orgs","repos_url":"https://api.github.com/users/jamhall/repos","events_url":"https://api.github.com/users/jamhall/events{/privacy}","received_events_url":"https://api.github.com/users/jamhall/received_events","type":"User","site_admin":false},"repo":{"id":28789863,"name":"s3rver","full_name":"jamhall/s3rver","owner":{"login":"jamhall","id":368589,"avatar_url":"https://avatars.githubusercontent.com/u/368589?v=3","gravatar_id":"","url":"https://api.github.com/users/jamhall","html_url":"https://github.com/jamhall","followers_url":"https://api.github.com/users/jamhall/followers","following_url":"https://api.github.com/users/jamhall/following{/other_user}","gists_url":"https://api.github.com/users/jamhall/gists{/gist_id}","starred_url":"https://api.github.com/users/jamhall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamhall/subscriptions","organizations_url":"https://api.github.com/users/jamhall/orgs","repos_url":"https://api.github.com/users/jamhall/repos","events_url":"https://api.github.com/users/jamhall/events{/privacy}","received_events_url":"https://api.github.com/users/jamhall/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamhall/s3rver","description":"A fake S3 server written in NodeJs","fork":false,"url":"https://api.github.com/repos/jamhall/s3rver","forks_url":"https://api.github.com/repos/jamhall/s3rver/forks","keys_url":"https://api.github.com/repos/jamhall/s3rver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamhall/s3rver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamhall/s3rver/teams","hooks_url":"https://api.github.com/repos/jamhall/s3rver/hooks","issue_events_url":"https://api.github.com/repos/jamhall/s3rver/issues/events{/number}","events_url":"https://api.github.com/repos/jamhall/s3rver/events","assignees_url":"https://api.github.com/repos/jamhall/s3rver/assignees{/user}","branches_url":"https://api.github.com/repos/jamhall/s3rver/branches{/branch}","tags_url":"https://api.github.com/repos/jamhall/s3rver/tags","blobs_url":"https://api.github.com/repos/jamhall/s3rver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamhall/s3rver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamhall/s3rver/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamhall/s3rver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamhall/s3rver/statuses/{sha}","languages_url":"https://api.github.com/repos/jamhall/s3rver/languages","stargazers_url":"https://api.github.com/repos/jamhall/s3rver/stargazers","contributors_url":"https://api.github.com/repos/jamhall/s3rver/contributors","subscribers_url":"https://api.github.com/repos/jamhall/s3rver/subscribers","subscription_url":"https://api.github.com/repos/jamhall/s3rver/subscription","commits_url":"https://api.github.com/repos/jamhall/s3rver/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamhall/s3rver/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamhall/s3rver/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamhall/s3rver/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamhall/s3rver/contents/{+path}","compare_url":"https://api.github.com/repos/jamhall/s3rver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamhall/s3rver/merges","archive_url":"https://api.github.com/repos/jamhall/s3rver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamhall/s3rver/downloads","issues_url":"https://api.github.com/repos/jamhall/s3rver/issues{/number}","pulls_url":"https://api.github.com/repos/jamhall/s3rver/pulls{/number}","milestones_url":"https://api.github.com/repos/jamhall/s3rver/milestones{/number}","notifications_url":"https://api.github.com/repos/jamhall/s3rver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamhall/s3rver/labels{/name}","releases_url":"https://api.github.com/repos/jamhall/s3rver/releases{/id}","created_at":"2015-01-04T23:49:00Z","updated_at":"2015-08-28T20:54:34Z","pushed_at":"2015-06-01T15:48:02Z","git_url":"git://github.com/jamhall/s3rver.git","ssh_url":"git@github.com:jamhall/s3rver.git","clone_url":"https://github.com/jamhall/s3rver.git","svn_url":"https://github.com/jamhall/s3rver","homepage":"","size":564,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jamhall/s3rver/pulls/4"},"html":{"href":"https://github.com/jamhall/s3rver/pull/4"},"issue":{"href":"https://api.github.com/repos/jamhall/s3rver/issues/4"},"comments":{"href":"https://api.github.com/repos/jamhall/s3rver/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/jamhall/s3rver/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/jamhall/s3rver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jamhall/s3rver/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/jamhall/s3rver/statuses/3b0e63d009d2e10c06bb135b3050b077aba24e22"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}