3d cartoon hands holding a phone

Unlock full course by purchasing a membership

Lesson 2

Using a Backend as a Service

Letting someone else do the hard work

STANDARD

Using Backend as a Service

In the previous lesson, we saw how to go about creating our own REST API and integrating it with our application. This is a reasonably common approach, but the more popular approach (especially for individual developers or smaller teams) is to use a Backend as a Service or BaaS solution.

Rather than building out the server yourself, and everything that might include like connecting to a database, managing user authentication, scaling for load, and so on — you can use a product with everything ready to go.

One of the most popular options is Firebase, and in the extended version of this course we will actually be building an application that uses Firebase. We will not be diving into how to use Firebase here, but the gist of it is this.

  1. You create an account for Firebase
  2. You create a project through their dashboard
  3. You will be given a configuration object/API key (this key is public)
  4. You install and use the SDK provided by Firebase to interact with the services they provide e.g. data storage, authentication, cloud functions, and more

Unlike with our own REST API we created where we were manually sending GET and POST requests, we wouldn’t actually do this with Firebase. Instead, we use their SDK to make requests like this:

  login(credentials: Credentials) {
    return signInWithEmailAndPassword(
      this.auth,
      credentials.email,
      credentials.password
    );
  }
STANDARD
Key

Thanks for checking out the preview of this lesson!

You do not have the appropriate membership to view the full lesson. If you would like full access to this module you can view membership options (or log in if you are already have an appropriate membership).