While Local Storage is great, it’s not ideal: it only stores data on the computer from which the user is accessing the page. This approach does not allow for the app to ‘remember’ anything when the same user tries to access it again from a different device. For that, you’re going to need a real backend.
By the end of this lesson, you should be able to:
- Explain which services are offered by Firebase
- Explain how to set up your app to use those services from Firebase Hosting
- Explain how to set up your app to communicate with and/or pass data to and from the various Firebase services
You can learn how to build a back-end later using Node.js. For now, you can outsource your backend functionality to a Backend-as-a-Service (BaaS) company like Firebase or Apigee. For this lesson, we’ll be learning Firebase.
Explore the different services offered by Firebase. Pay particular attention to Cloud Firestore for now. You may or may not also want to use Firebase Hosting and/or any of the other services offered by Firebase, particularly Cloud Storage and Authentication, but you probably won’t need any of those for your first Firebase project.
Complete this Google Codelab, which will walk you through setting up a sample app on Firebase step by step.
Go back to one of the previous projects (e.g. the library project or the to-do app), and follow the Firebase setup guide to prepare it for interaction with a Firebase backend.
- Caution: If you’re not going to be hosting your app on Firebase Hosting, but prefer to leave it where it is (e.g. on GitHub Pages), take a closer look at the section below Step 4, there should be a link, which directs you to the “Available Libraries” page. Then, use what you learned in the codelab to make your own app actually interact with Firebase.
This section contains helpful links to other content. It isn’t required, so consider it supplemental.