Serverless Functions in JavaScript | Build Netlify Serverless Functions with JavaScript

  Рет қаралды 6,405

Dave Gray

Dave Gray

Күн бұрын

Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
Build Serverless Functions in JavaScript with this Netlify Serverless Functions tutorial. Serverless Functions can be written in JavaScript and set up for deployment with GitHub and Netlify.
Subscribe ➜ bit.ly/3nGHmNn
🔗 Source Code: github.com/gitdagray/serverless
(0:00) Intro
(1:35) Structure HTML
(3:19) Add CSS
(7:26) Add JavaScript
(11:09) Add a CSS Animation
(12:53) JS Fetch with Async / Await
(14:23) Quick Refactor
(15:10) Create a git repo and push to GitHub
(17:05) Link your project to Netlify with Continuous Deployment
(18:05) Install NodeJS
(18:25) Install Netlify CLI
(19:48) Initialize npm
(20:14) Create a .gitignore file
(20:38) Install node-fetch package dependency
(21:11) Create the serverless functions folder
(21:22) Create a serverless function
(23:48) Modify the fetch function in our main.js
(24:35) Use Netlify CLI to test our serverless function
(25:11) A more practical serverless example
(27:27) Where to add environment variables in Netlify
✅ Follow Me:
Twitter: / yesdavidgray
LinkedIn: / davidagray
Blog: yesdavidgray.com
Reddit: / daveoneleven
Was this tutorial about how to build Serverless Functions with JavaScript helpful? If so, please share. Let me know your thoughts in the comments.
#serverless #functions #javascript

Пікірлер: 30
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 жыл бұрын
This tutorial shows you how to set up serverless functions with Netlify. Netlify makes AWS serverless lambda functions easy. I show you how to set up an API relay that can hide your API keys from your frontend code, but you can do much more with serverless because it is like having a NodeJS server to run code on! If you are interested in another way to hide API keys, check out my NodeJS API Relay tutorial: kzfaq.info/get/bejne/q9Fpo9ma3tzWpJs.html
@ahmad-murery
@ahmad-murery 3 жыл бұрын
I didn't get the idea behind the serverless before since we still need to create server functions and I didn't find anyone do it the way you did by creating it locally then convert it to a nodejs and finally upload it to a serverless server Thanks and I hope you can make a dedicated series on serverless functions
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 жыл бұрын
Thanks Ahmad!
@marie-elizeventer7080
@marie-elizeventer7080 Жыл бұрын
This was GREAT! I have been watching tutorials for a week now to get data from an API, and here you explained it so plainly! Thanks!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful! 💯
@andrewclarke6916
@andrewclarke6916 3 жыл бұрын
Brad Traversy sent me here, Dave. I enjoyed learning about using serverless functions which are new to me. Looking forward to seeing project based tutorials from you in the future.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 жыл бұрын
Thanks to Brad and thank you for watching and subscribing. Working on a project right now!
@hellelo.5840
@hellelo.5840 2 жыл бұрын
this was a smooth tutorial, that rock hair suits you, You are a rock Star
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you! 🙏🤘
@CynthiaSotoCaballerolYEAHl
@CynthiaSotoCaballerolYEAHl 3 жыл бұрын
Soooooo greeeatttt tutorial for understanding the serverless thing
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 жыл бұрын
Thank you!
@rangabharath4253
@rangabharath4253 3 жыл бұрын
awesome as always Dave. Thank u so much :-)
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 жыл бұрын
You're welcome!
@kewltopix
@kewltopix 3 жыл бұрын
Hope all is getting better Dave... awesome and timely content as always!!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 жыл бұрын
Thanks! 💯
@CynthiaSotoCaballerolYEAHl
@CynthiaSotoCaballerolYEAHl 3 жыл бұрын
Ohhh, are you ok Dave?
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 жыл бұрын
@@CynthiaSotoCaballerolYEAHl - I'm doing good. A family emergency did occur that changed my priorities for the semester. Thanks for asking!
@CynthiaSotoCaballerolYEAHl
@CynthiaSotoCaballerolYEAHl 3 жыл бұрын
@@DaveGrayTeachesCode all the good vibes for you and your family ✨
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 жыл бұрын
@@CynthiaSotoCaballerolYEAHl thank you!
@tunzdev
@tunzdev 3 жыл бұрын
Thanks for this!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 жыл бұрын
You're welcome!
@marie-elizeventer7080
@marie-elizeventer7080 Жыл бұрын
Thanks!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you for the support! 🙏
@saadowain3511
@saadowain3511 2 жыл бұрын
Amazing
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you!
@zakhariihusar6975
@zakhariihusar6975 3 жыл бұрын
I started to learn JS recently. Made a small website in 3 languages(English, Italian, Ukrainian) on netlify, but the problem is that I duplicated pages for every language, was looking for a solution, for example to keep translation in JSON. But I see to use serverless functions I need to know backend as well?
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 жыл бұрын
Yes, "serverless" refers to not needing to maintain a server, but it actually still runs code on a server in the cloud. Serverless functions are great for this because instead of developing a complete backend API, you just build the limited functionality you need. The backend code is Node JS though, so after you are comfortable with Javascript, it is not difficult to pick up. 😀
@zakhariihusar6975
@zakhariihusar6975 3 жыл бұрын
@@DaveGrayTeachesCode thank you a lot, now I'm not so confused about it👍
@stepanmutsikivsky8987
@stepanmutsikivsky8987 10 ай бұрын
On my lubuntu: sudo npm i netlify-cli -g
Netlify Serverless Functions with Netlify Dev
12:17
James Q Quick
Рет қаралды 29 М.
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 24 МЛН
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 19 МЛН
What are Serverless Functions?
6:55
Ahmed Etefy
Рет қаралды 789
Edge functions VS Serverless functions
7:23
Tuomo Kankaanpää
Рет қаралды 17 М.
8 Javascript Solutions You HAVE TO KNOW
34:20
Dave Gray
Рет қаралды 7 М.
I don't need Firebase anymore! I use Appwrite Cloud Functions
8:34
Adrian Twarog
Рет қаралды 34 М.
Netlify & Serverless - 1. Netlify Fundamentals
14:55
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 3,6 М.
Netlify Tutorial - How to build and deploy websites using Netlify
3:32:20
freeCodeCamp.org
Рет қаралды 110 М.
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,3 МЛН
Копия iPhone с WildBerries
1:00
Wylsacom
Рет қаралды 8 МЛН