{"action":"created","comment":{"url":"https://api.github.com/repos/apollographql/apollo-server/pulls/comments/234194137","pull_request_review_id":175778459,"id":234194137,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDE5NDEzNw==","diff_hunk":"@@ -0,0 +1,188 @@\n+---\n+title: Deploy a fullstack Apollo app with Netlify\n+sidebar_title: Netlify\n+description: How to run your API using Netlify Functions on AWS Lambda\n+---\n+\n+[Netlify functions](https://www.netlify.com/docs/functions/), is a new way to deploy server-side code to AWS Lambda alongside your frontend, right from GitHub. In this guide, I'll show you why Netlify's functions is a great way to run your whole Apollo app.\n+\n+1. Use the same platform to deploy your frontend and API code.\n+2. Deploy previews of both your frontend and API on every pull request.\n+3. No need to worry about scaling containers due to a serverless architecture.\n+\n+We'll set up a \"Hello World\" API and frontend for an Apollo app on Netlify. Let's get started!\n+\n+## Download and Run the Netlify Starter Kit\n+\n+Download and run the [official Netlify create-react-app and Lambda starter kit](https://github.com/netlify/create-react-app-lambda). This will set us up with a base for our frontend and API code.\n+\n+\n+```bash\n+git clone https://github.com/netlify/create-react-app-lambda.git\n+cd create-react-app-lambda\n+npm install\n+```\n+\n+Let’s take a quick look at the file structure here:\n+\n+* **package.json:** our dependencies, shared between client and server code. You can also split them up into separate directories later, depending on your preference.\n+* **netlify.toml:** configuration for Netlify and the Netlify functions.\n+* **src/:** code for our React app.\n+* **src/lambda/:** code that will be deployed to Lambda by Netlify.\n+\n+In `package.json`, you’ll find scripts to run the frontend and lambda code:\n+\n+```js\n+\"scripts\": {\n+  \"start\": \"react-scripts start\",\n+  \"start:lambda\": \"netlify-lambda serve src/lambda\",\n+  \"build\": \"react-scripts build\",\n+  \"build:lambda\": \"netlify-lambda build src/lambda\",\n+}\n+```\n+\n+Run the code to see that everything is working. We have to open two terminal windows to run the frontend and functions at the same time:\n+\n+```bash\n+# In the first terminal","path":"docs/source/deployment/netlify.md","position":47,"original_position":47,"commit_id":"5f1ff4717320b3ad58bcf7f5142516d31bc6c84a","original_commit_id":"5f1ff4717320b3ad58bcf7f5142516d31bc6c84a","user":{"login":"abernix","id":841294,"node_id":"MDQ6VXNlcjg0MTI5NA==","avatar_url":"https://avatars0.githubusercontent.com/u/841294?v=4","gravatar_id":"","url":"https://api.github.com/users/abernix","html_url":"https://github.com/abernix","followers_url":"https://api.github.com/users/abernix/followers","following_url":"https://api.github.com/users/abernix/following{/other_user}","gists_url":"https://api.github.com/users/abernix/gists{/gist_id}","starred_url":"https://api.github.com/users/abernix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abernix/subscriptions","organizations_url":"https://api.github.com/users/abernix/orgs","repos_url":"https://api.github.com/users/abernix/repos","events_url":"https://api.github.com/users/abernix/events{/privacy}","received_events_url":"https://api.github.com/users/abernix/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n# In the first terminal, run the local development server.\r\n# This emulates the Netlify Functions runtime environment.\r\n```","created_at":"2018-11-16T12:54:00Z","updated_at":"2018-11-16T12:58:54Z","html_url":"https://github.com/apollographql/apollo-server/pull/1733#discussion_r234194137","pull_request_url":"https://api.github.com/repos/apollographql/apollo-server/pulls/1733","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/comments/234194137"},"html":{"href":"https://github.com/apollographql/apollo-server/pull/1733#discussion_r234194137"},"pull_request":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/1733"}}},"pull_request":{"url":"https://api.github.com/repos/apollographql/apollo-server/pulls/1733","id":218328133,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4MzI4MTMz","html_url":"https://github.com/apollographql/apollo-server/pull/1733","diff_url":"https://github.com/apollographql/apollo-server/pull/1733.diff","patch_url":"https://github.com/apollographql/apollo-server/pull/1733.patch","issue_url":"https://api.github.com/repos/apollographql/apollo-server/issues/1733","number":1733,"state":"open","locked":false,"title":"Add Netlify deploy guide","user":{"login":"unicodeveloper","id":2946769,"node_id":"MDQ6VXNlcjI5NDY3Njk=","avatar_url":"https://avatars1.githubusercontent.com/u/2946769?v=4","gravatar_id":"","url":"https://api.github.com/users/unicodeveloper","html_url":"https://github.com/unicodeveloper","followers_url":"https://api.github.com/users/unicodeveloper/followers","following_url":"https://api.github.com/users/unicodeveloper/following{/other_user}","gists_url":"https://api.github.com/users/unicodeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/unicodeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unicodeveloper/subscriptions","organizations_url":"https://api.github.com/users/unicodeveloper/orgs","repos_url":"https://api.github.com/users/unicodeveloper/repos","events_url":"https://api.github.com/users/unicodeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/unicodeveloper/received_events","type":"User","site_admin":false},"body":"<!--\r\n  Thanks for filing a pull request on GraphQL Server!\r\n\r\n  Please look at the following checklist to ensure that your PR\r\n  can be accepted quickly:\r\n-->\r\n\r\nTODO:\r\n\r\n* [ ] Update CHANGELOG.md with your change (include reference to issue & this PR)\r\n* [ ] Make sure all of the significant new logic is covered by tests\r\n* [ ] Rebase your changes on master so that they can be merged easily\r\n* [ ] Make sure all tests and linter rules pass\r\n\r\n<!--**Pull Request Labels**\r\n\r\nWhile not necessary, you can help organize our pull requests by labeling this issue when you open it.  To add a label automatically, simply [x] mark the appropriate box below:\r\n\r\n- [ ] feature\r\n- [ ] blocking\r\n- [ ] docs\r\n\r\nTo add a label not listed above, simply place `/label another-label-name` on a line by itself.\r\n-->","created_at":"2018-09-26T14:00:50Z","updated_at":"2018-11-16T12:58:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1be9a9060cfb37769fc96bb2ad475dd6333882a8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":385587048,"node_id":"MDU6TGFiZWwzODU1ODcwNDg=","url":"https://api.github.com/repos/apollographql/apollo-server/labels/docs","name":"docs","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apollographql/apollo-server/pulls/1733/commits","review_comments_url":"https://api.github.com/repos/apollographql/apollo-server/pulls/1733/comments","review_comment_url":"https://api.github.com/repos/apollographql/apollo-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apollographql/apollo-server/issues/1733/comments","statuses_url":"https://api.github.com/repos/apollographql/apollo-server/statuses/5f1ff4717320b3ad58bcf7f5142516d31bc6c84a","head":{"label":"apollographql:deploy-netlify","ref":"deploy-netlify","sha":"5f1ff4717320b3ad58bcf7f5142516d31bc6c84a","user":{"login":"apollographql","id":17189275,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg5Mjc1","avatar_url":"https://avatars0.githubusercontent.com/u/17189275?v=4","gravatar_id":"","url":"https://api.github.com/users/apollographql","html_url":"https://github.com/apollographql","followers_url":"https://api.github.com/users/apollographql/followers","following_url":"https://api.github.com/users/apollographql/following{/other_user}","gists_url":"https://api.github.com/users/apollographql/gists{/gist_id}","starred_url":"https://api.github.com/users/apollographql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollographql/subscriptions","organizations_url":"https://api.github.com/users/apollographql/orgs","repos_url":"https://api.github.com/users/apollographql/repos","events_url":"https://api.github.com/users/apollographql/events{/privacy}","received_events_url":"https://api.github.com/users/apollographql/received_events","type":"Organization","site_admin":false},"repo":{"id":56760633,"node_id":"MDEwOlJlcG9zaXRvcnk1Njc2MDYzMw==","name":"apollo-server","full_name":"apollographql/apollo-server","private":false,"owner":{"login":"apollographql","id":17189275,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg5Mjc1","avatar_url":"https://avatars0.githubusercontent.com/u/17189275?v=4","gravatar_id":"","url":"https://api.github.com/users/apollographql","html_url":"https://github.com/apollographql","followers_url":"https://api.github.com/users/apollographql/followers","following_url":"https://api.github.com/users/apollographql/following{/other_user}","gists_url":"https://api.github.com/users/apollographql/gists{/gist_id}","starred_url":"https://api.github.com/users/apollographql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollographql/subscriptions","organizations_url":"https://api.github.com/users/apollographql/orgs","repos_url":"https://api.github.com/users/apollographql/repos","events_url":"https://api.github.com/users/apollographql/events{/privacy}","received_events_url":"https://api.github.com/users/apollographql/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apollographql/apollo-server","description":":earth_africa: GraphQL server for Express, Connect, Hapi, Koa and more","fork":false,"url":"https://api.github.com/repos/apollographql/apollo-server","forks_url":"https://api.github.com/repos/apollographql/apollo-server/forks","keys_url":"https://api.github.com/repos/apollographql/apollo-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apollographql/apollo-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apollographql/apollo-server/teams","hooks_url":"https://api.github.com/repos/apollographql/apollo-server/hooks","issue_events_url":"https://api.github.com/repos/apollographql/apollo-server/issues/events{/number}","events_url":"https://api.github.com/repos/apollographql/apollo-server/events","assignees_url":"https://api.github.com/repos/apollographql/apollo-server/assignees{/user}","branches_url":"https://api.github.com/repos/apollographql/apollo-server/branches{/branch}","tags_url":"https://api.github.com/repos/apollographql/apollo-server/tags","blobs_url":"https://api.github.com/repos/apollographql/apollo-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apollographql/apollo-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apollographql/apollo-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/apollographql/apollo-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apollographql/apollo-server/statuses/{sha}","languages_url":"https://api.github.com/repos/apollographql/apollo-server/languages","stargazers_url":"https://api.github.com/repos/apollographql/apollo-server/stargazers","contributors_url":"https://api.github.com/repos/apollographql/apollo-server/contributors","subscribers_url":"https://api.github.com/repos/apollographql/apollo-server/subscribers","subscription_url":"https://api.github.com/repos/apollographql/apollo-server/subscription","commits_url":"https://api.github.com/repos/apollographql/apollo-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/apollographql/apollo-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/apollographql/apollo-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/apollographql/apollo-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/apollographql/apollo-server/contents/{+path}","compare_url":"https://api.github.com/repos/apollographql/apollo-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apollographql/apollo-server/merges","archive_url":"https://api.github.com/repos/apollographql/apollo-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apollographql/apollo-server/downloads","issues_url":"https://api.github.com/repos/apollographql/apollo-server/issues{/number}","pulls_url":"https://api.github.com/repos/apollographql/apollo-server/pulls{/number}","milestones_url":"https://api.github.com/repos/apollographql/apollo-server/milestones{/number}","notifications_url":"https://api.github.com/repos/apollographql/apollo-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apollographql/apollo-server/labels{/name}","releases_url":"https://api.github.com/repos/apollographql/apollo-server/releases{/id}","deployments_url":"https://api.github.com/repos/apollographql/apollo-server/deployments","created_at":"2016-04-21T09:26:01Z","updated_at":"2018-11-16T11:35:47Z","pushed_at":"2018-11-16T12:41:20Z","git_url":"git://github.com/apollographql/apollo-server.git","ssh_url":"git@github.com:apollographql/apollo-server.git","clone_url":"https://github.com/apollographql/apollo-server.git","svn_url":"https://github.com/apollographql/apollo-server","homepage":"https://www.apollographql.com/docs/apollo-server/","size":8462,"stargazers_count":5661,"watchers_count":5661,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":639,"mirror_url":null,"archived":false,"open_issues_count":263,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":639,"open_issues":263,"watchers":5661,"default_branch":"master"}},"base":{"label":"apollographql:master","ref":"master","sha":"d68f518d034b3927e3bea6d8a90f1e3306053122","user":{"login":"apollographql","id":17189275,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg5Mjc1","avatar_url":"https://avatars0.githubusercontent.com/u/17189275?v=4","gravatar_id":"","url":"https://api.github.com/users/apollographql","html_url":"https://github.com/apollographql","followers_url":"https://api.github.com/users/apollographql/followers","following_url":"https://api.github.com/users/apollographql/following{/other_user}","gists_url":"https://api.github.com/users/apollographql/gists{/gist_id}","starred_url":"https://api.github.com/users/apollographql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollographql/subscriptions","organizations_url":"https://api.github.com/users/apollographql/orgs","repos_url":"https://api.github.com/users/apollographql/repos","events_url":"https://api.github.com/users/apollographql/events{/privacy}","received_events_url":"https://api.github.com/users/apollographql/received_events","type":"Organization","site_admin":false},"repo":{"id":56760633,"node_id":"MDEwOlJlcG9zaXRvcnk1Njc2MDYzMw==","name":"apollo-server","full_name":"apollographql/apollo-server","private":false,"owner":{"login":"apollographql","id":17189275,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg5Mjc1","avatar_url":"https://avatars0.githubusercontent.com/u/17189275?v=4","gravatar_id":"","url":"https://api.github.com/users/apollographql","html_url":"https://github.com/apollographql","followers_url":"https://api.github.com/users/apollographql/followers","following_url":"https://api.github.com/users/apollographql/following{/other_user}","gists_url":"https://api.github.com/users/apollographql/gists{/gist_id}","starred_url":"https://api.github.com/users/apollographql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollographql/subscriptions","organizations_url":"https://api.github.com/users/apollographql/orgs","repos_url":"https://api.github.com/users/apollographql/repos","events_url":"https://api.github.com/users/apollographql/events{/privacy}","received_events_url":"https://api.github.com/users/apollographql/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apollographql/apollo-server","description":":earth_africa: GraphQL server for Express, Connect, Hapi, Koa and more","fork":false,"url":"https://api.github.com/repos/apollographql/apollo-server","forks_url":"https://api.github.com/repos/apollographql/apollo-server/forks","keys_url":"https://api.github.com/repos/apollographql/apollo-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apollographql/apollo-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apollographql/apollo-server/teams","hooks_url":"https://api.github.com/repos/apollographql/apollo-server/hooks","issue_events_url":"https://api.github.com/repos/apollographql/apollo-server/issues/events{/number}","events_url":"https://api.github.com/repos/apollographql/apollo-server/events","assignees_url":"https://api.github.com/repos/apollographql/apollo-server/assignees{/user}","branches_url":"https://api.github.com/repos/apollographql/apollo-server/branches{/branch}","tags_url":"https://api.github.com/repos/apollographql/apollo-server/tags","blobs_url":"https://api.github.com/repos/apollographql/apollo-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apollographql/apollo-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apollographql/apollo-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/apollographql/apollo-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apollographql/apollo-server/statuses/{sha}","languages_url":"https://api.github.com/repos/apollographql/apollo-server/languages","stargazers_url":"https://api.github.com/repos/apollographql/apollo-server/stargazers","contributors_url":"https://api.github.com/repos/apollographql/apollo-server/contributors","subscribers_url":"https://api.github.com/repos/apollographql/apollo-server/subscribers","subscription_url":"https://api.github.com/repos/apollographql/apollo-server/subscription","commits_url":"https://api.github.com/repos/apollographql/apollo-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/apollographql/apollo-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/apollographql/apollo-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/apollographql/apollo-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/apollographql/apollo-server/contents/{+path}","compare_url":"https://api.github.com/repos/apollographql/apollo-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apollographql/apollo-server/merges","archive_url":"https://api.github.com/repos/apollographql/apollo-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apollographql/apollo-server/downloads","issues_url":"https://api.github.com/repos/apollographql/apollo-server/issues{/number}","pulls_url":"https://api.github.com/repos/apollographql/apollo-server/pulls{/number}","milestones_url":"https://api.github.com/repos/apollographql/apollo-server/milestones{/number}","notifications_url":"https://api.github.com/repos/apollographql/apollo-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apollographql/apollo-server/labels{/name}","releases_url":"https://api.github.com/repos/apollographql/apollo-server/releases{/id}","deployments_url":"https://api.github.com/repos/apollographql/apollo-server/deployments","created_at":"2016-04-21T09:26:01Z","updated_at":"2018-11-16T11:35:47Z","pushed_at":"2018-11-16T12:41:20Z","git_url":"git://github.com/apollographql/apollo-server.git","ssh_url":"git@github.com:apollographql/apollo-server.git","clone_url":"https://github.com/apollographql/apollo-server.git","svn_url":"https://github.com/apollographql/apollo-server","homepage":"https://www.apollographql.com/docs/apollo-server/","size":8462,"stargazers_count":5661,"watchers_count":5661,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":639,"mirror_url":null,"archived":false,"open_issues_count":263,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":639,"open_issues":263,"watchers":5661,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/1733"},"html":{"href":"https://github.com/apollographql/apollo-server/pull/1733"},"issue":{"href":"https://api.github.com/repos/apollographql/apollo-server/issues/1733"},"comments":{"href":"https://api.github.com/repos/apollographql/apollo-server/issues/1733/comments"},"review_comments":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/1733/comments"},"review_comment":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apollographql/apollo-server/pulls/1733/commits"},"statuses":{"href":"https://api.github.com/repos/apollographql/apollo-server/statuses/5f1ff4717320b3ad58bcf7f5142516d31bc6c84a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"abernix"}}