This document summarizes Bret McGowen's presentation on building serverless web apps with Google's Firebase platform. It introduces Firebase and Cloud Functions for Firebase, which allow developers to write backend code that automatically runs in response to events from Firebase features. It provides examples of using Cloud Functions triggers from Firebase Authentication, Storage, and Realtime Database events. The document also demonstrates integrating Cloud Vision API image recognition with a Cloud Function.
2. bit.ly/firebase-milano | @BretMcG
Node 8
(I recommend using NVM from github.com/creationix/nvm)
Text editor
Visual Studio Code, Sublime, etc
Firebase tools
$ npm -g install firebase-tools
Install
bit.ly/firebase-milano
3. bit.ly/firebase-milano | @BretMcG
Contents
What is Firebase?
What are Cloud Functions for Firebase?
Why Cloud Functions?
Using Authentication Triggers
Using Storage Triggers
Using Database Triggers
4. Google's platform for building
mobile and web apps
Backed by the power of Google
Cloud Platform
6. bit.ly/firebase-milano | @BretMcG
Firebase
Google's mobile platform
Serverless databases
Authentication
Analytics
Notifications
And much more...
Google Cloud Platform
Google's public cloud
Machine Learning
Big Data
IoT
Virtual machines
And much more...
17. bit.ly/firebase-milano | @BretMcG
Setting Up FriendlyChat
02.
Get the Sample Code
git clone
https://github.com/firebase/f
riendlychat
01.
Create a Firebase project and
Set up your app
From the console, create new
project called FriendlyChat and
enable Google Authentication
Install Firebase CLI and
deploy FriendlyChat
$ npm -g install firebase-tools
$ firebase deploy --except
functions
03.
18. bit.ly/firebase-milano | @BretMcG
Setting Up FriendlyChat
02.
Get the Sample Code
git clone
https://github.com/firebase/f
riendlychat
01.
Create a Firebase project and
Set up your app
From the console, create new
project called FriendlyChat and
enable Google Authentication
Install Firebase CLI and
deploy FriendlyChat
$ npm -g install firebase-tools
$ firebase deploy --except
functions
03.
19. bit.ly/firebase-milano | @BretMcG
Setting Up FriendlyChat
02.
Get the Sample Code
git clone
https://github.com/firebase/f
riendlychat
01.
Create a Firebase project and
Set up your app
From the console, create new
project called FriendlyChat and
enable Google Authentication
Install Firebase CLI and
deploy FriendlyChat
$ npm -g install firebase-tools
$ firebase deploy --except
functions
03.
30. bit.ly/firebase-milano | @BretMcG
tinyurl.com/functions-lab | @bretmcg
● A user creates an account with email
account and password.
● A user signs in for the first time using
a federated identity provider.
● The developer creates an account
using the Firebase Admin SDK.
Authentication
Triggers
36. bit.ly/firebase-milano | @BretMcG
Machine learning as an API
Cloud
Vision API
Cloud
Translation API
Cloud
Natural Language
API
Use your own data to train models
Cloud
Speech API
Cloud Video
Intelligence
Cloud Machine
Learning Engine
TensorFlow
Two ways we can help you benefit from ML
41. bit.ly/firebase-milano | @BretMcG
tinyurl.com/functions-lab | @bretmcg
● All writes at the database path
● First write at the database path
● All writes after the first write at the
database path
● Delete at the database path
Database
Triggers