Giter Club home page Giter Club logo

netlify-functions-workshop's Introduction

Netlify Functions Serverless Workshop

This repo will teach you the core concepts of using serverless functions with Netlify.

Table of Contents

Using this repo

After following the prerequisite setup steps, work from the lessons folders.

If you get stuck or want to look ahead checkout the lessons-code-complete directory for the completed code.

Repo directory structure:

|── /lessons                 ✅ Work from these files!
|── /lessons-code-complete   💡 Complete lesson answers
|── /_instructor             🙈 Ignore these files. For instructor updates
|── /_scripts                🙈 Ignore these files

Workshop Lessons

Core Concepts

Lesson Final Code
1 Hello World
Deploying Your First Endpoint
Complete Code
2 Dynamic Content
Rendering Dynamic Content
Complete Code
3 Using Environment Variables
Using environment variables
Complete Code
4 Using Dependancies
Using NPM dependencies
Complete Code
5 Authenication
Protecting Endpoints
Complete Code
6 Using A Database
Using a database
Complete Code
7 Using Middleware
Using Function middleware
Complete Code
8 Using Addons
Deploying Your First Endpoint
Complete Code
9 Using Cors
Adding CORS support
Complete Code
10 Testing Functions
Testing Serverless functions
Complete Code

Use Cases

Lesson Final Code
1 Rest Api
Using functions for REST APIs
Complete Code
2 Graphql
Using functions for GraphQL APIs
Complete Code
3 Redirects
Using functions for Dynamic Redirects
Complete Code
4 Setting Cookies
Using functions to set cookies
Complete Code
5 Fetching Data
Using functions to fetch external API data
Complete Code
6 Scraping
Using functions for web scraping
Complete Code
7 Sending Emails
Using functions for sending email
Complete Code
8 Sending Sms
Using functions for sending text messages
Complete Code
9 Event Driven Functions
Using Netlify Event Driven functions
Complete Code
10 Payment Processing
Using functions for Payment Processing
Complete Code
11 Handling Oauth
Handing OAuth Flows
Complete Code
12 Handling File Uploads
Using functions for uploading files
Complete Code
13 Returning Dynamic Images
Using functions for returning images
Complete Code

Helpful Tools

  • Postman - desktop app for quick & easy endpoint testing
  • NVM - Node version manager

Prerequisites & Setup Steps

  1. Install the latest LTS version of Node. How to install Node.

  2. Verify you have git on your machine

    Most machines come pre-loaded with git. 🎉

    To verify you have git, open up your terminal and run:

    which git

    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.

  3. Setup a Netlify account

    If you don't already have an Netlify account, let's get one setup.

    Click here to setup a free Netlify account

  4. Install Netlify CLI

    Open up your terminal and run:

    npm install netlify-cli -g
  5. Connect the Netlify CLI with your Netlify account

    Open up your terminal and run:

    netlify login
  6. Verify the Netlify CLI works on your machine

    Open up your terminal and run:

    netlify --help
    

    This should return the list of commands from the CLI tool.

Bonus setup:

  • Install postman for quick & easy testing of endpoints we deploy
  • It's also recommended that you use nvm (node version manager) just in case you need to change versions of node for the workshop.

Additional Learning materials

Netlify

Serverless

netlify-functions-workshop's People

Contributors

davidwells avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.