All language subtitles for 003 Setting up the Firebase SDK_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French Download
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

In this lecture, we're going to install the Firebase SDK.

The Firebase SDK is a library that will assist us with communicating with Firebase as products.

SDK is short for software development kits.

It'll make our lives easier.

In the resource section of this lecture, I provide a link to the installation page for the SDK.

This page goes into detail on how you can install Firebase.

The SDK can be installed with NPM.

Let's try installing it.

Switch over to the command line and the command line.

Run the following command and PM i firebase at eight.

After a few moments, Firebase should have been installed.

Let's start configuring Firebase into our project.

Before adding the configuration, we should ask ourselves, where should we write the configuration?

It's possible to configure Firebase directly from the main JS file.

On the other hand, I think it would be a good idea to separate the configuration into another file.

Separation will reduce clutter in the main JS file in the includes directory.

Create a file called Firebase dot js.

You don't have to call it this, but I recommend keeping the name short and relevant.

Next, open the main JS file.

We'll import the file into the main JS file, otherwise the code inside the Firebase file will never

execute below the import statement for the validation file.

Import the Firebase module.

We can begin to configure Firebase switch back to the Firebase File.

The first thing we'll do is import the Firebase module.

We're importing a specific module from the Firebase Library called App.

The App Module is the core of the Firebase SDK.

Regardless of what services or products you plan on using, the core must always be imported.

The core module is what will help you with configuring and connecting to Firebase.

If we were to omit the app from the path, we'd be importing every Firebase feature.

This includes features we aren't actively using or need.

This will unnecessarily increase the bundle size of our app.

The proper way of importing Firebase is to individually import what we need.

The Firebase module is broken up into packages by passing in Firebase alone, you're telling it to import

all of its packages.

In almost all cases, you will need to import the app package.

This package is the core of Firebase.

The rest of the features won't be usable unless you import this first.

If you're on version nine of Firebase, the path must be updated to Firebase Slash Compat slash app.

You can verify the version of Firebase by viewing the package.

For those of you on older versions of Firebase, the compatibility path does not need to be added.

Otherwise.

Every time we import Firebase, you should always modify your path to include this directory.

The next step is to grab the connectivity details from Firebase in the browser.

Navigate to the console for the music project.

You should be on the overview page.

You can navigate there by clicking on the menu item in the sidebar.

At the top of the page, Firebase will ask us to select a platform.

We can select iOS, Android, Web or Unity.

We'll want to click on the one that says Web.

A pop up will appear asking us for more details about our project.

It's going to ask us to assign a nickname.

We'll give the project the nickname Music.

It'll ask us if we'd like to host the app on Firebase.

We'll look into that in a later section.

Let's leave this option unchecked.

We can enable hosting later if we'd like.

Let's keep moving forward.

After a while, Firebase will spit out a configuration object you can copy and paste.

We're not going to copy the entire code snippet.

Just copy the Firebase config variable.

Go back to the editor.

Paste the variable into the Firebase configuration file.

Let's go over the object together.

The very first property is the API key.

The API key is how will be able to connect to Firebase.

It's how we let Firebase know that we're the ones sending the request and not some other application.

The next property is the authentication domain.

Firebase will provide us with a URL where we can send the authentication information.

It's what we'll need if we want to add authentication to our app.

Next, there's the project ID.

It's followed by the storage bucket.

A bucket is used to describe the location where the files are stored and application can have multiple

buckets.

But we're using the free plan, which comes with one bucket.

One bucket is plenty for the application we're building.

The next property is the sender ID.

Firebase comes with a feature to push notifications between applications instantly.

We won't be using this feature, but it is there if you need it.

I'm going to remove this ID since we won't be using it.

Firebase won't throw an error if it's unavailable.

Lastly, we have the app ID property.

Firebase allows for multiple apps to be connected to a project.

We're building a web app.

If we added an iOS or Android app, they would be assigned unique IDs.

Now that we have the configuration object, we can initialize the app by calling the Firebase Dot Initialize

App function.

We can pass the configuration object into the function.

In some cases, the code snippet you copied from Firebase will try calling the function without accessing

it from the Firebase object.

If that's the case, update this line to match mine.

We're not going to structure this function.

This function will initialize firebase by connecting to it.

It'll return an instance of firebase we can use to communicate with it.

Let's export the instance under the default namespace.

This step is important.

Otherwise, the instance will not be accessible to our components.

Whenever we need to use Firebase, we can import this module, switch over to the browser to check if

everything is working.

The page loads.

Normally there's one last step we'll want to take.

Head back to the editor.

At the top of the file.

Import the fire base slash off module.

We're importing the authentication module because we'll be using Firebase to authenticate the user.

If we'd like the authentication service to be available, we'll need to import it.

I want to point out that we're not assigning the module a name.

It's not necessary because Firebase is smart enough to extend the core.

It will not export another object for you.

We're finished.

We've successfully integrated the Firebase SDK into our project.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.