Firebase Functions Tutorial #1 - Introduction

Net Ninja · Beginner ·🛠️ AI Tools & Apps ·6y ago

Key Takeaways

Introduces Firebase Functions and sets up a new project

Full Transcript

all right then gang and welcome to your very first firebase cloud functions tutorial now just really quickly before we start the tutorial for those of you who want to support the channel and join the gang officially you can do by clicking that join button right here is just in 99 cents or pence per month and you get these cool little ninja loyalty badges next to your name in the comments down below when you leave a comment you can also join by clicking the button right beneath the video if you're watching one now which I'm guessing you are it does exactly the same thing alright so now that's at the way let's get on with the tutorial so then for those of you who've been watching my channel for any length of time you'll already know that I'm a fan of firebase and I've done a lot of firebase tutorials over the last couple of years now you might already know what firebase is but for those of you who don't basically firebase is a back-end as a service now what do I mean by that well I mean it allows us to do something called server love computing and that means we don't have to set up our own server to build apps or websites and we can use a firebase service and services to do that instead and we can use services like the database or authentication our hosting or cloud storage and we only need to use the bits that we need our apps or sites so we can use all of these different firebase reaches and more for our sites and apps and we don't have to setup our own server to manage all of this now even though that's great sometimes you want to write your own server-side code to maybe add roles to users or to validate data or to react to changes in your database basically to run any kind of code that you don't want to run on the front end now that's kind of hard to do if we're using a syphilis approach because we don't have a server to do that on so firebase made cloud functions to allow us to do this and that basically means that we can write code that runs server-side on firebase servers and that code can interact with other firebase services like the database or authentication or storage etc and each bit of code that we write is packaged or into a function and deployed to firebase now each function can do something different so for example we could have a new user that signs up to our app or website using the firebase authentication now you might want to create a record in the database of for that user but sometimes you don't want to allow database write access from the front-end over here you want to do that from the server so what you could do is write and deploy a cloud function to do that instead so the function would listen for new user signups and trigger whenever that event happens to create a database record for that user now there's many different use cases for cloud functions and we're going to see a few different ones in this series now just quickly firebase cloud functions run in a node.js environment on firebase service and that means that we can write our functions in JavaScript or typescript now I'm going to be using JavaScript for this course however all the same theory and procedures will apply for typescript as well okay and so I'm just going to give you a quick demo of the project that we're going to create throughout this course while we learn about firebase functions so first of all I'm going to register as a new user and to do that I'll say toad at the net ninja code at UK and by the way toad is a Mario character the password I'll just say test one two three and I'm going to register once I've registered I can see that we have a list of tutorial requests that different registered people can make and each one has the number of up votes so I can upvote things like so and it's going to take a second to do that at first because when you first invoke a firebase function it does take a minute to do but you can see eventually it goes to three and it goes to the top so the most up voted tutorials go to the top and the least voted go down below now like I said that took a little while to do but when you start to use your functions more the more a function is used it becomes quicker so for example if I up vote this one it's going to be a little bit quicker now you'll see that got to pretty much straight away so we can do that and add new requests so I'm going to click on add request and any to think of something that we're gonna add now so let's just say view and laravel and submit request and then we see that one at the bottom as well has zero votes to begin with but if I try and vote it I can do and it's going to go to one now each user can only vote something once so if I try to vote this again it's not gonna let me do that and I get a little notification saying that so that's cloud functions in action and we'll see all of that later on so this is what we're going to be building as we go forward but before you start I would recommend that you already understand about firebase authentication because this uses firebase authentication and I'm not going to go into great detail about how that works I would expect you to know the basics already so if you want to learn more about that I've got a whole playlist all about firebase authentication right here on this channel the links of that is going to be down below so definitely check out that first of all also to store all the data we're going to be using firebase fire stored databases and again you should already know about that because I'm not going to go into great depth about the intricacies so if you want to learn that first of all which I do recommend check out this playlist that's firebase fire store tutorial complete tutorial from beginning to end that is on this channel as well I'll leave the link down below the final is kind of a given but I would expect you to know a little bit about JavaScript as well asynchronous code functions all that jazz if you want to learn JavaScript I've got a great introduction to it here modern JavaScript tutorial and I'll leave the links of that down below as well finally you do need node J s installed on your computer to work with firebase we're going to be using the firebase CLI later and to use that we need node and the node package manager installed so if you've not already go to no js2 org and download it right here and finally all of the course files for this series are going to be right here on github this repo firebase functions this link is going to be right down below as well and each lesson in this series has different codes so each lesson has its own branch on this Gilberry so if you want to see the code for lesson 8 for example go to the branch drop-down and go to lesson 8 and you're going to see all of the code right here ok so there we go my friends that is your introduction to firebase functions so I really really hope you enjoy this series if you do don't forget to share subscribe and like that really means a lot and if you really want to support the cars you can do by joining the channel or right here just click on this join button and you can join for 99 pence or cents for month depending on where you live and you get a nice little budget next to your name in the comments as well but anyway I'll see you in the very next tutorial where we're going to setup firebase in our project [Music]

Original Description

Hey gang, in this Firebase Functions tutorial series we'll learn about cloud functions from the ground up to create a mini tutorial request website. 🐱‍👤🐱‍👤 JOIN THE GANG - https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg/join ---------------------------------------- 🐱‍💻 🐱‍💻 My Udemy Courses: + Modern JavaScript - https://www.thenetninja.co.uk/udemy/modern-javascript + Vue JS & Firebase - http://www.thenetninja.co.uk/udemy/vue-and-firebase + D3.js & Firebase - https://www.thenetninja.co.uk/udemy/d3-and-firebase 🐱‍💻 🐱‍💻 Course Files: https://github.com/iamshaunjp/firebase-functions/ 🐱‍💻 🐱‍💻 Other Related Free Courses: + Firebase Firestore - https://www.youtube.com/playlist?list=PL4cUxeGkcC9itfjle0ji1xOZ2cjRGY_WB + Firebase Authentication - https://www.youtube.com/playlist?list=PL4cUxeGkcC9jUPIes_B8vRjn1_GaplOPQ + Firebase Hosting - https://www.youtube.com/playlist?list=PL4cUxeGkcC9he0kHAyiyr3dDO2xw0NWoP + Modern JS Preview - https://www.youtube.com/playlist?list=PL4cUxeGkcC9haFPT7J25Q9GRB_ZkFrQAc 🐱‍💻 🐱‍💻 The Net Ninja Community Boards: https://community.thenetninja.co.uk/
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Net Ninja · Net Ninja · 0 of 60

← Previous Next →
1 Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Net Ninja
2 Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Net Ninja
3 Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Net Ninja
4 GraphQL Tutorial #1 - Introduction to GraphQL
GraphQL Tutorial #1 - Introduction to GraphQL
Net Ninja
5 GraphQL Tutorial #2 - A Birdseye View of GraphQL
GraphQL Tutorial #2 - A Birdseye View of GraphQL
Net Ninja
6 GraphQL Tutorial #3 - Project (stack) Overview
GraphQL Tutorial #3 - Project (stack) Overview
Net Ninja
7 GraphQL Tutorial #4 - Making Queries (front-end preview)
GraphQL Tutorial #4 - Making Queries (front-end preview)
Net Ninja
8 GraphQL Tutorial #5 - Express App Setup
GraphQL Tutorial #5 - Express App Setup
Net Ninja
9 GraphQL Tutorial #6 - Setting up GraphQL
GraphQL Tutorial #6 - Setting up GraphQL
Net Ninja
10 GraphQL Tutorial #7 - GraphQL Schema
GraphQL Tutorial #7 - GraphQL Schema
Net Ninja
11 GraphQL Tutorial #8 - Root Query
GraphQL Tutorial #8 - Root Query
Net Ninja
12 GraphQL Tutorial #9 - The Resolve Function
GraphQL Tutorial #9 - The Resolve Function
Net Ninja
13 GraphQL Tutorial #10 - Testing Queries in Graphiql
GraphQL Tutorial #10 - Testing Queries in Graphiql
Net Ninja
14 GraphQL Tutorial #11 - GraphQL ID Type
GraphQL Tutorial #11 - GraphQL ID Type
Net Ninja
15 GraphQL Tutorial #12 - Author Type
GraphQL Tutorial #12 - Author Type
Net Ninja
16 GraphQL Tutorial #13 - Type Relations
GraphQL Tutorial #13 - Type Relations
Net Ninja
17 GraphQL Tutorial #14 - GraphQL Lists
GraphQL Tutorial #14 - GraphQL Lists
Net Ninja
18 GraphQL Tutorial #15 - More on Root Queries
GraphQL Tutorial #15 - More on Root Queries
Net Ninja
19 GraphQL Tutorial #16 - Connecting to mLab
GraphQL Tutorial #16 - Connecting to mLab
Net Ninja
20 GraphQL Tutorial #17 - Mongoose Models
GraphQL Tutorial #17 - Mongoose Models
Net Ninja
21 GraphQL Tutorial #18 - Mutations
GraphQL Tutorial #18 - Mutations
Net Ninja
22 GraphQL Tutorial #19 - More on Mutations
GraphQL Tutorial #19 - More on Mutations
Net Ninja
23 GraphQL Tutorial #20 - Updating the Resolve Functions
GraphQL Tutorial #20 - Updating the Resolve Functions
Net Ninja
24 GraphQL Tutorial #21 - GraphQL NonNull
GraphQL Tutorial #21 - GraphQL NonNull
Net Ninja
25 GraphQL Tutorial #22 - Adding a Front-end
GraphQL Tutorial #22 - Adding a Front-end
Net Ninja
26 GraphQL Tutorial #23 - Create React App
GraphQL Tutorial #23 - Create React App
Net Ninja
27 GraphQL Tutorial #24 - Book List Component
GraphQL Tutorial #24 - Book List Component
Net Ninja
28 GraphQL Tutorial #25 - Apollo Client Setup
GraphQL Tutorial #25 - Apollo Client Setup
Net Ninja
29 GraphQL Tutorial #26 - Making Queries from React
GraphQL Tutorial #26 - Making Queries from React
Net Ninja
30 GraphQL Tutorial #27 - Rendering Data in a Component
GraphQL Tutorial #27 - Rendering Data in a Component
Net Ninja
31 GraphQL Tutorial #28 - Add Book Component
GraphQL Tutorial #28 - Add Book Component
Net Ninja
32 GraphQL Tutorial #29 - External Query File
GraphQL Tutorial #29 - External Query File
Net Ninja
33 GraphQL Tutorial #30 - Updating Component State
GraphQL Tutorial #30 - Updating Component State
Net Ninja
34 GraphQL Tutorial #31 - Composing Queries
GraphQL Tutorial #31 - Composing Queries
Net Ninja
35 GraphQL Tutorial #32 - query variables
GraphQL Tutorial #32 - query variables
Net Ninja
36 GraphQL Tutorial #33 - Re-fetching Queries
GraphQL Tutorial #33 - Re-fetching Queries
Net Ninja
37 GraphQL Tutorial #34 - Book Details Component
GraphQL Tutorial #34 - Book Details Component
Net Ninja
38 GraphQL Tutorial #36 - Styling the App
GraphQL Tutorial #36 - Styling the App
Net Ninja
39 GraphQL Tutorial #35 - Making a Single Query
GraphQL Tutorial #35 - Making a Single Query
Net Ninja
40 Build Apps with Vue & Firebase - Udemy Course
Build Apps with Vue & Firebase - Udemy Course
Net Ninja
41 Updated Vue & Firebase Course (Udemy)
Updated Vue & Firebase Course (Udemy)
Net Ninja
42 Vue & Firebase Real-time Chat (Preview) #1 - Intro
Vue & Firebase Real-time Chat (Preview) #1 - Intro
Net Ninja
43 Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Net Ninja
44 Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Net Ninja
45 Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Net Ninja
46 Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Net Ninja
47 Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Net Ninja
48 Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Net Ninja
49 Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Net Ninja
50 Object Oriented JavaScript Tutorial #1 - Introduction
Object Oriented JavaScript Tutorial #1 - Introduction
Net Ninja
51 Object Oriented JavaScript Tutorial #2 - Object Literals
Object Oriented JavaScript Tutorial #2 - Object Literals
Net Ninja
52 Object Oriented JavaScript Tutorial #3 - Updating Properties
Object Oriented JavaScript Tutorial #3 - Updating Properties
Net Ninja
53 Object Oriented JavaScript Tutorial #4 - Classes
Object Oriented JavaScript Tutorial #4 - Classes
Net Ninja
54 Object Oriented JavaScript Tutorial #5  - Class Constructors
Object Oriented JavaScript Tutorial #5 - Class Constructors
Net Ninja
55 Object Oriented JavaScript Tutorial #6 - Class Methods
Object Oriented JavaScript Tutorial #6 - Class Methods
Net Ninja
56 Object Oriented JavaScript Tutorial #7 - Method Chaining
Object Oriented JavaScript Tutorial #7 - Method Chaining
Net Ninja
57 Object Oriented JavaScript Tutorial #8 - Class Inheritance
Object Oriented JavaScript Tutorial #8 - Class Inheritance
Net Ninja
58 Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Net Ninja
59 Object Oriented JavaScript Tutorial #10 - Prototype
Object Oriented JavaScript Tutorial #10 - Prototype
Net Ninja
60 Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Net Ninja

Related AI Lessons

Up next
I Asked ChatGPT to Apply to 500 Jobs (8 Interviews in 48 Hours)
Sabrina Ramonov 🍄
Watch →