{"id":17246455,"url":"https://github.com/davidwells/netlify-functions-workshop","last_synced_at":"2025-04-07T12:10:49.498Z","repository":{"id":45265275,"uuid":"178913274","full_name":"DavidWells/netlify-functions-workshop","owner":"DavidWells","description":"Netlify Serverless Functions Workshop","archived":false,"fork":false,"pushed_at":"2021-03-11T17:34:56.000Z","size":440,"stargazers_count":344,"open_issues_count":6,"forks_count":84,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-31T11:04:23.344Z","etag":null,"topics":["functions","netlify","netlify-functions","serverless","workshop"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidWells.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-01T17:28:53.000Z","updated_at":"2025-01-30T22:07:04.000Z","dependencies_parsed_at":"2022-09-03T15:00:41.222Z","dependency_job_id":null,"html_url":"https://github.com/DavidWells/netlify-functions-workshop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidWells%2Fnetlify-functions-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidWells%2Fnetlify-functions-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidWells%2Fnetlify-functions-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidWells%2Fnetlify-functions-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidWells","download_url":"https://codeload.github.com/DavidWells/netlify-functions-workshop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["functions","netlify","netlify-functions","serverless","workshop"],"created_at":"2024-10-15T06:33:58.701Z","updated_at":"2025-04-07T12:10:49.470Z","avatar_url":"https://github.com/DavidWells.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Netlify Functions Serverless Workshop\n\nThis repo will teach you the [core concepts of using serverless functions](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts) with Netlify.\n\n## Table of Contents\n\n\u003c!-- AUTO-GENERATED-CONTENT:START (TOC) --\u003e\n- [Using this repo](#using-this-repo)\n- [Workshop Lessons](#workshop-lessons)\n  * [Core Concepts](#core-concepts)\n  * [Use Cases](#use-cases)\n- [Helpful Tools](#helpful-tools)\n- [Prerequisites \u0026 Setup Steps](#prerequisites--setup-steps)\n- [Additional Learning materials](#additional-learning-materials)\n  * [Netlify](#netlify)\n  * [Serverless](#serverless)\n\u003c!-- AUTO-GENERATED-CONTENT:END --\u003e\n\n## Using this repo\n\nAfter following the [prerequisite setup steps](https://github.com/DavidWells/serverless-workshop#prerequisites--setup-steps), work from the [**lessons**](./lessons) folders.\n\nIf you get stuck or want to look ahead checkout the [**lessons-code-complete**](./lessons-code-complete) directory for the completed code.\n\n**Repo directory structure:**\n\n```\n|── /lessons                 ✅ Work from these files!\n|── /lessons-code-complete   💡 Complete lesson answers\n|── /_instructor             🙈 Ignore these files. For instructor updates\n|── /_scripts                🙈 Ignore these files\n```\n\n## Workshop Lessons\n\n\u003c!-- AUTO-GENERATED-CONTENT:START (GENERATE_LESSONS_LIST)--\u003e\n### Core Concepts\n\n| Lesson | Final Code  |\n|:--------------------------- |:-----|\n| [1 Hello World](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/core-concepts/1-hello-world) \u003cbr/\u003e Deploying Your First Endpoint | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts/1-hello-world)  |\n| [2 Dynamic Content](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/core-concepts/2-dynamic-content) \u003cbr/\u003e Rendering Dynamic Content | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts/2-dynamic-content)  |\n| [3 Using Environment Variables](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/core-concepts/3-using-environment-variables) \u003cbr/\u003e Using environment variables | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts/3-using-environment-variables)  |\n| [4 Using Dependancies](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/core-concepts/4-using-dependancies) \u003cbr/\u003e Using NPM dependencies | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts/4-using-dependancies)  |\n| [5 Authenication](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/core-concepts/5-authenication) \u003cbr/\u003e Protecting Endpoints | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts/5-authenication)  |\n| [6 Using A Database](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/core-concepts/6-using-a-database) \u003cbr/\u003e Using a database | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts/6-using-a-database)  |\n| [7 Using Middleware](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/core-concepts/7-using-middleware) \u003cbr/\u003e Using Function middleware | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts/7-using-middleware)  |\n| [8 Using Addons](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/core-concepts/8-using-addons) \u003cbr/\u003e Deploying Your First Endpoint | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts/8-using-addons)  |\n| [9 Using Cors](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/core-concepts/9-using-cors) \u003cbr/\u003e Adding CORS support | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts/9-using-cors)  |\n| [10 Testing Functions](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/core-concepts/10-testing-functions) \u003cbr/\u003e Testing Serverless functions | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/core-concepts/10-testing-functions)  |\n\n\n### Use Cases\n\n| Lesson | Final Code  |\n|:--------------------------- |:-----|\n| [1 Rest Api](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/1-rest-api) \u003cbr/\u003e Using functions for REST APIs | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/1-rest-api)  |\n| [2 Graphql](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/2-graphql) \u003cbr/\u003e Using functions for GraphQL APIs | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/2-graphql)  |\n| [3 Redirects](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/3-redirects) \u003cbr/\u003e Using functions for Dynamic Redirects | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/3-redirects)  |\n| [4 Setting Cookies](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/4-setting-cookies) \u003cbr/\u003e Using functions to set cookies | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/4-setting-cookies)  |\n| [5 Fetching Data](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/5-fetching-data) \u003cbr/\u003e Using functions to fetch external API data | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/5-fetching-data)  |\n| [6 Scraping](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/6-scraping) \u003cbr/\u003e Using functions for web scraping | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/6-scraping)  |\n| [7 Sending Emails](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/7-sending-emails) \u003cbr/\u003e Using functions for sending email | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/7-sending-emails)  |\n| [8 Sending Sms](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/8-sending-sms) \u003cbr/\u003e Using functions for sending text messages | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/8-sending-sms)  |\n| [9 Event Driven Functions](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/9-event-driven-functions) \u003cbr/\u003e Using Netlify Event Driven functions | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/9-event-driven-functions)  |\n| [10 Payment Processing](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/10-payment-processing) \u003cbr/\u003e Using functions for Payment Processing | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/10-payment-processing)  |\n| [11 Handling Oauth](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/11-handling-oauth) \u003cbr/\u003e Handing OAuth Flows | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/11-handling-oauth)  |\n| [12 Handling File Uploads](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/12-handling-file-uploads) \u003cbr/\u003e Using functions for uploading files | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/12-handling-file-uploads)  |\n| [13 Returning Dynamic Images](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons/use-cases/13-returning-dynamic-images) \u003cbr/\u003e Using functions for returning images | [Complete Code](https://github.com/DavidWells/netlify-functions-workshop/tree/master/lessons-code-complete/use-cases/13-returning-dynamic-images)  |\n\n\n\u003c!-- AUTO-GENERATED-CONTENT:END --\u003e\n\n## Helpful Tools\n\n- [Postman](https://www.getpostman.com/) - desktop app for quick \u0026 easy endpoint testing\n- [NVM](https://github.com/creationix/nvm) - Node version manager\n\n## Prerequisites \u0026 Setup Steps\n\n1. **Install the latest LTS version of [Node](https://nodejs.org/)**. [How to install Node](https://docs.npmjs.com/getting-started/installing-node).\n2. **Verify you have [git](https://git-scm.com/downloads) on your machine**\n\n    Most machines come pre-loaded with git. 🎉\n\n    To verify you have `git`, open up your terminal and run:\n\n    ```bash\n    which git\n    ```\n\n    This should return a path of where git is installed. If the command returns `git not found`, we will need to install git on your machine.\n\n3. **Setup a Netlify account**. \n\n    If you don't already have an Netlify account, let's get one setup.\n\n    [Click here to setup a free Netlify account](http://app.netlify.com)\n\n4. **[Install Netlify CLI](https://cli.netlify.com/)**\n\n    Open up your terminal and run:\n\n    ```bash\n    npm install netlify-cli -g\n    ```\n\n5. **Connect the Netlify CLI with your Netlify account**. \n\n    Open up your terminal and run:\n\n    ```bash\n    netlify login\n    ```\n\n6. **Verify the Netlify CLI works on your machine**\n\n    Open up your terminal and run:\n\n    ```\n    netlify --help\n    ```\n\n    This should return the list of commands from the CLI tool.\n\n**Bonus setup:**\n\n- Install [postman](https://www.getpostman.com/) for quick \u0026 easy testing of endpoints we deploy\n- It's also recommended that you use [nvm](https://github.com/creationix/nvm) (node version manager) just in case you need to change versions of node for the workshop.\n\n\n## Additional Learning materials\n\n### Netlify\n\n- [Function Docs](https://www.netlify.com/docs/functions/)\n- [Function Examples](https://functions.netlify.com/examples)\n- [Function Tutorials](https://functions.netlify.com/tutorials)\n\n### Serverless\n\n- [Applying the Serverless Mindset to Any Tech Stack](https://www.youtube.com/watch?v=8Rzv68K8ZOY)\n- [Serverless Architectural Patterns](https://medium.com/@eduardoromero/serverless-architectural-patterns-261d8743020)\n- [Serverless Microservice Patterns for AWS](https://www.jeremydaly.com/serverless-microservice-patterns-for-aws/)\n- [Production-Ready Serverless](https://www.manning.com/livevideo/production-ready-serverless)\n- [Cloud Native Development Patterns \u0026 Best Practices](https://www.amazon.com/Cloud-Native-Development-Patterns-Practices/dp/1788473922)\n- [JavaScript Cloud Native Development Cookbook](https://www.amazon.com/JavaScript-Cloud-Native-Development-Cookbook/dp/1788470419)\n- [Serverless framework workshop](https://github.com/DavidWells/serverless-workshop)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidwells%2Fnetlify-functions-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidwells%2Fnetlify-functions-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidwells%2Fnetlify-functions-workshop/lists"}