{"action":"created","issue":{"url":"https://api.github.com/repos/awslabs/aws-serverless-express/issues/116","repository_url":"https://api.github.com/repos/awslabs/aws-serverless-express","labels_url":"https://api.github.com/repos/awslabs/aws-serverless-express/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/awslabs/aws-serverless-express/issues/116/comments","events_url":"https://api.github.com/repos/awslabs/aws-serverless-express/issues/116/events","html_url":"https://github.com/awslabs/aws-serverless-express/pull/116","id":292195641,"number":116,"title":"Replace node server with mock-http objects","user":{"login":"LoneRifle","id":10572368,"avatar_url":"https://avatars2.githubusercontent.com/u/10572368?v=4","gravatar_id":"","url":"https://api.github.com/users/LoneRifle","html_url":"https://github.com/LoneRifle","followers_url":"https://api.github.com/users/LoneRifle/followers","following_url":"https://api.github.com/users/LoneRifle/following{/other_user}","gists_url":"https://api.github.com/users/LoneRifle/gists{/gist_id}","starred_url":"https://api.github.com/users/LoneRifle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoneRifle/subscriptions","organizations_url":"https://api.github.com/users/LoneRifle/orgs","repos_url":"https://api.github.com/users/LoneRifle/repos","events_url":"https://api.github.com/users/LoneRifle/events{/privacy}","received_events_url":"https://api.github.com/users/LoneRifle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-01-28T10:53:46Z","updated_at":"2018-04-18T16:08:43Z","closed_at":"2018-01-29T01:42:11Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/awslabs/aws-serverless-express/pulls/116","html_url":"https://github.com/awslabs/aws-serverless-express/pull/116","diff_url":"https://github.com/awslabs/aws-serverless-express/pull/116.diff","patch_url":"https://github.com/awslabs/aws-serverless-express/pull/116.patch"},"body":"* Bring in mock-http so that we can use their mocks of http.ClientRequest and http.ServerResponse as arguments to a RequestListener, which express implements\r\n* Rework `proxy()` flow to accommodate this, while maintaining some semblance of API backwards compatibility\r\n* `createServer()` now just returns the given request listener with `_binaryTypes` added to it. This allows it to be supplied to `proxy()` instead of a full HTTP server. `serverListenCallback` will be invoked immediately, given that there are no servers involved now and technically requests can be immediately processed\r\n* `proxy()` now takes in the `binaryTypes` argument, so that one can just proxy the request listener, event, context and optional binary types directly without having to invoke `createServer()` first. If `binaryTypes` is undefined, `proxy()` will fall back on `requestListener._binaryTypes`. This allows existing users of aws-serverless-express to upgrade their library without worrying about breaking changes.\r\n* Remove now-redundant functions relating to HTTP server lifecycle\r\n\r\nDispensing with the http server allows us to avoid the associated spin up time to open and attach to a socket, allowing us to process requests much sooner.\r\n\r\nThis PR should also fix all requests relating to socket errors, and supersede their corresponding PRs."},"comment":{"url":"https://api.github.com/repos/awslabs/aws-serverless-express/issues/comments/382441459","html_url":"https://github.com/awslabs/aws-serverless-express/pull/116#issuecomment-382441459","issue_url":"https://api.github.com/repos/awslabs/aws-serverless-express/issues/116","id":382441459,"user":{"login":"brettstack","id":1882775,"avatar_url":"https://avatars0.githubusercontent.com/u/1882775?v=4","gravatar_id":"","url":"https://api.github.com/users/brettstack","html_url":"https://github.com/brettstack","followers_url":"https://api.github.com/users/brettstack/followers","following_url":"https://api.github.com/users/brettstack/following{/other_user}","gists_url":"https://api.github.com/users/brettstack/gists{/gist_id}","starred_url":"https://api.github.com/users/brettstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brettstack/subscriptions","organizations_url":"https://api.github.com/users/brettstack/orgs","repos_url":"https://api.github.com/users/brettstack/repos","events_url":"https://api.github.com/users/brettstack/events{/privacy}","received_events_url":"https://api.github.com/users/brettstack/received_events","type":"User","site_admin":false},"created_at":"2018-04-18T16:08:43Z","updated_at":"2018-04-18T16:08:43Z","author_association":"COLLABORATOR","body":"Does the \"socket hang up\" error only happen locally?"}}
{"actor":{"display_login":"brettstack"}}