Skip to content

Latest commit

 

History

History

GSP643_Build-a-Serverless-Web-App-with-Firebase

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

GSP643 —— Build a Serverless Web App with Firebase

Table of Contents (🔎 Click to expand/collapse)

Overview

For the labs in the Google Cloud Run Serverless Workshop, you will read through a fictitious business scenario and assist the characters with their serverless migration plan.

Twelve years ago, Lily started the Pet Theory chain of veterinary clinics. The Pet Theory chain has expanded rapidly over the last few years. Their old appointment system is not able to handle the increased load or allow clients to schedule their own appointments, so Lily asked Patrick, in IT, and Ruby, a consultant, to build a cloud-based system that easily scale.

Architecture

This diagram gives you an overview of the services you will be using and how they connect to one another:

Architecture

Enable the Google Cloud Firestore API

  1. Click Navigation Menu > APIs & Services > Library.
  2. Search for "Firestore".
  3. Click Google Cloud Firestore API.
  4. Click Enable.

Setup Firestore Database

  1. Click Navigation Menu > Firestore.
  2. Click SELECT NATIVE MODE or SELECT DATASTORE MODE button.
    • Native Mode: good for letting lots of users access the same data at the same time and it has features like real-time updates and direct connection between your database and web/mobile clients.
    • Datastore Mode: puts an emphasis on high throughput (lots of reads and writes).
  3. Click CREATE DATABASE.

Create Firebase Project

  1. Open the Firebase console.
  2. Click Create Project.
  3. Select Project ID from drop-down menu and accept the Firebase terms.
  4. Click Continue.
  5. Click Comfirm.
  6. Click Continue.
  7. Click Continue.

Firebase CLI

# install firebase cli
$ npm install -g firebase-tools

# login with firebase cli
$ firebase login --no-localhost

# deploy Firebase hosting
$ firebase init
$ firebase deploy

References