Netlify Functions examples
Hi there! This is a playground repo to test out Netlify’s Lambda Functions. You can see a live demo of the examples at https://functions-playground.netlify.com.
If you want your own copy to play around with, the quickest way to get it up and running is clicking the Deploy to Netlify button below. It will clone this repository into your own account, and deploy the site to Netlify.
Table of Contents
Click to expand
Setup
To run the examples locally, here’s what you’ll need:
System Requirements:
cd
into your local copy of the repository and run yarn
or npm install
cd netlify-functions-example
yarn
Running the examples
yarn start
This will start the client server on http://localhost:8080, and the netlify-lambda server on http://localhost:9000.
netlify-lambda isn’t required to deploy Lambda functions to Netlify, but it offers some handy features out of the box that make it quicker to get started, like the local dev server and nice defaults for transpiling and bundling functions in production.
The client server is configured to proxy /.netlify
requests to the Lambda server (see webpack.client.js). This is the same behavior the site has when it’s deployed to Netlify.
Community Function Examples
Example | Author |
---|---|
Airtable As Database Using Airtable as a database |
adenin-sites |
Bart Station Departures Get the SF BART Station Departures |
philipbordallo |
Behance Rss Feed Fetch RSS feed from behance |
jhackett1 |
Check Weather Forcast Check the weather forcast with bugsnag for debugging |
mikesprague |
Chuck Norris Quote Generator Fetch Chuck Norris quotes |
auchau |
Contact Form With Airtable & Mailgun Process contact form submission and store in airtable |
stefanjudis |
Create New User In Firebase Create new user in firebase admin |
believelody |
Dropbox Webhook Dropbox webhook to trigger Netlify builds |
chaseadamsio |
Fetch Instagram Posts Get recent instagram posts |
strt |
Fetch Rasperry Pi Url Fetch Rasperry pi URL from dataplicity |
ZachGawlik |
Fetch Crypto Currency Prices Get current bitcoin prices from localbitcoins.com |
iamronsuez |
Fetch Currency Rates Fetch currency rates from eurofxref |
dlebech |
Fetch Currency Rates Fetch currency rates from eurofxref |
dlebech |
Fetch Github Repos Graphql get github repos from graphql endpoint |
kiranbhalerao123 |
Github Finder Serverless Implementation of GitHub Finder |
shayant98 |
Mailchimp Signup Flow Netlify functions + subscribe users to mailchimp |
smkkstudios |
Medium Rss Feed Fetch RSS feed from medium |
jhackett1 |
Meetup Raffle Draw raffle winners at your Meetup event via meetup.com API |
wKovacs64 |
Myanimelist Search Api Search MyAnimeList API |
destruc7i0n |
Netlibox Netlify + Dropbox using functions + redirects to validate the webhook |
jimniels |
Netlify Form Notifications To Slack Ping slack on new netlify comments |
vectronic |
Save Zillow Prices Search and save Zillow results to firebase |
nickmrosen |
Send Email Via 'Sendmail' Pkg Send email with no STMP server via 'sendmail' pkg |
Urigo |
Shopify Ecommerce Netlify functions + shopify for an ecommerce store |
NEsfandiari |
Slack Channel Invites Send slack channel invites |
kylemcd |
Verify Phone Numbers Verify phone numbers with Authy SMS |
p8952 |
Airtable Netlify Short Urls This is a simple short-url service that works with netlify functions and uses airtable. |
kentcdodds |
Bus Schedule Tracker Tracking bus schedules |
edumentab |
Contentful Authless Comments Contentful authless comments |
shaunpersad |
Contentful Image Saver Save images to contentful |
mirshko |
Create React App Lambda Create React App with baked in Netlify functions support |
netlify |
Detect Csp Violations CSP violations reporting by setting the lambda URL as the CSP report-uri |
stefanjudis |
Fetch Files From Google Drive List files from google drive API |
JustinBeckwith |
Form Spam Filter Filter form spam and send to Zapier webhook |
chrisjm |
Gatsby And Netlify Functions Handling Static Forms, Auth & Serverless Functions with Gatsby on Netlify view the project |
snipcart |
Gatsby Stripe Store Starter Gatsby & Netlify functions stripe store |
raae |
Get Items From Cosmicjs List out objects from cosmicjs |
aslanvaroqua |
Get Random Emoji Return a random emoji |
mrozilla |
Get Weather Via Openweathermap Get the weather via openweathermap |
mattburrell |
Get Youtube Video Captions Get youtube video captions from video ID |
nicooprat |
Get Youtube Video Data Get youtube video data from video ID |
nicooprat |
Ifttt To Flick Instagram Make New Github Post Webhook from IFTTT when new Flickr photo with tag #blog create github file and post. Automated photo blog view the project |
rretsiem |
Intercom As Oauth Login Oauth via intercom |
DavidWells |
Lookup Dns DNS lookup of a site |
HJGreen |
Mailchimp Landing Page Landing page with mailchimp |
tobilg |
Mongodb And Functions Using mongoDB + functions view the project |
maciejmatu |
Netlify Functions Apollo Graphql Deploying Apollo graphql on netlify functions view the project |
stubailo |
Netlify Functions As Zips Functions as zips |
DavidWells |
Netlify Functions Crud App With Fauna Using faunaDB as datastore |
netlify |
Netlify Functions Express Using express with netlify functions |
DavidWells |
Netlify Functions Gated Sites Gating multiple sites with Okta |
DavidWells |
Netlify Headless Site Serve entire site via Netlify functions + dynamic serverside HTML rendering |
rabbah |
Netlify Identity Whitelist Emails Validate emails on Netlify identity signup |
escaladesports |
Password Protected Netlify Build Trigger Trigger Netlify deploy with password protected function |
HeapSpace |
Ping Superfeedr On Deploy Ping Superfeedr RSS, Atom, or JSON feeds on successful deploy. Uses event driven functions |
anarchivist |
Post A Tweet Post a tweet to Twitter |
colbyfayock |
Primsa Graphql Example Netlify functions + primsa + graphql |
auchau |
Process Stripe Payment Process a stripe payment |
alexpriceonline |
Process Upload Send To Trello Slack Mailgun Process form file upload and send to results to trello, slack, & mailgun |
NimbusForWork |
Progressive Form Enhancement Via Functions Handle Ajax & normal form POST submissions via functions view the project |
DavidWells |
Proxy Blocked Google Analytics Proxy pageviews to google analytics incase google analytics is blocked on the client side |
codeniko |
Proxy Tracking Data To Loggly proxy arbitrary tracking data to a log management service Loggly |
codeniko |
Pusher Auth Authenication for pusher pub/sub |
NathanHeffley |
Save Data To Google Sheets Save emails to googlesheets |
grod220 |
Save Twitch Clips Save To Postgres Grab clips from twitch and insert into postgres database |
stphnchoe |
Scrape Parse And Render Dynamic Html Scrape url, parse with cheerio and render new html out |
jamesbgl |
Scrape Twitter Avatars Scrape mobile twitter HTML to return the URLs of a user avatar: view the project |
philhawksworth |
Send Custom Netlify Build Slack Notification Custom netlify build status in slack |
mirshko |
Send Email Via Aws Sns Sends a question submitted from HTML question form via AWS SES. This example connects to an external AWS account |
frzng |
Send Email Via Nodemailer send email via nodemailer |
kicholen |
Send Email Via Sendgrid send email via sendgrid |
francoislesenne |
Serverless Auth Strategies How to protected & scoped down functions to specific users |
DavidWells |
Serverside Hashing Serverside hashing via crypto |
SquishyCat |
Shorten Links With Bitly Shorten links with the bit.ly API |
nbw |
Stripe Payment Processing stripe payment processing |
alexmacarthur |
Swambda Openapi Integrate OpenAPI (swagger) specifications and lambda into an easy-to-use routing tier |
fehguy |
Textjoy Weekly inspirational messages via SMS view the project |
alexpriceonline |
Tokbox Session Manager Build live interactive video, voice and messaging into your web and mobile apps via tokbox |
slap-dash |
Token Hider Via Proxy Token hider api passthrough proxy |
depadiernos |
Url Shortening Service URL shortening service |
philhawksworth |
Using S3 As A Database Example of using AWS s3 as a datastore |
walbuc |
Verify Okta Verify an Okta token with Go |
netlify |
Tutorials
Contributing
We are happy to accept more examples from the community
Adding an example
- Add your example to
examples.json
Make sure to include the following fields. If there is no live demo/blog post etc, you can omit the url
from the object.
{
"name": "netlify-functions-apollo-graphql",
"description": "Deploying Apollo graphql on netlify functions ",
"code": "https://github.com/stubailo/apollo-netlify-lambda-app",
"url": "https://blog.apollographql.com/deploy-a-fullstack-apollo-app-with-netlify-45a7dfd51b0b"
}
- Regenerate the
README.md
with the following command
npm run docs
- Open a new pull request with your example.