Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Firebase Cloud Functions
Search
Maribel Maisano
November 14, 2020
Programming
0
46
Firebase Cloud Functions
Firebase Cloud Functions - DSC Universidad Tecnológica de Panamá
Maribel Maisano
November 14, 2020
Tweet
Share
More Decks by Maribel Maisano
See All by Maribel Maisano
Estrategias de monetización en apps móviles
maribelmai
0
25
Crea tu primera app Android
maribelmai
0
59
Implementando MVVM en una app Android
maribelmai
0
49
Firebase - Backend en la nube
maribelmai
0
24
Android KTX - Mejor código gracias a Kotlin
maribelmai
0
73
Other Decks in Programming
See All in Programming
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
250
ThorVG Viewer In VS Code
nors
0
770
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
AtCoder Conference 2025
shindannin
0
1k
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
CSC307 Lecture 04
javiergs
PRO
0
660
CSC307 Lecture 07
javiergs
PRO
0
550
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
150
Featured
See All Featured
Designing Experiences People Love
moore
144
24k
Marketing to machines
jonoalderson
1
4.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Un-Boring Meetings
codingconduct
0
200
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
53
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
Mind Mapping
helmedeiros
PRO
0
78
Build your cross-platform service in a week with App Engine
jlugia
234
18k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
Transcript
Firebase Cloud Functions DSC- Universidad Tecnológica de Panamá Maribel Maisano
• @maribelmai Android Developer WTM Ambassador • GDG & WTM Buenos Aires
Por qué Firebase
El problema • Arquitectura cliente-servidor • Diseño del servidor •
Brecha de productividad entre la idea y el producto
Cloud Functions
Características • Permite definir funciones individuales a ejecutarse en la
nube sin necesidad de un servidor • Se pueden escribir bajo entorno Node.js • Se puede indicar su ejecución definiendo distintos triggers
Primeros pasos • Instalación de Firebase-CLI curl -sL https://firebase.tools |
bash
Primeros pasos • Creación de un directorio para el proyecto
firebase init
Qué hace ese comando? • Crea la estructura de directorios
necesaria • Crea el proyecto en la Firebase Console o vincula uno existente • Inicializa un proyecto Node.js • Instala las dependencias necesarias
En el archivo index.js definiremos nuestras funciones Cloud functions
Triggers (disparadores)
Request HTTP con query params exports.buscar = functions.https.onRequest((request, res) =>
{ var query = request.query.terminoBuscado // ... return res.send("OK") }
Request HTTP con body params exports.reservarPromo = functions.https.onRequest((request, response) =>
{ var idUsuario = request.body.idUsuario var idPromo = request.body.idPromo //... return response.status(200).send("OK"); }
Cambios en Firestore y Realtime Database exports.crearPartida = functions.firestore .document('partidas/{idPartida}')
.onCreate((snap, context) => { const partida = snap.data(); // Ejecutar una acción })
Deploy
Publicar funciones • Se ejecuta el comando firebase deploy y
las funciones estarán disponibles de forma pública • Todas las dependencias requeridas serán instaladas en el servidor automáticamente • Es posible utilizar el emulador para hacer deploy localmente
None
¡Veámoslo funcionando!
En qué puedo aplicarlo?
Enlaces útiles • Cloud Functions Codelab https://codelabs.developers.google.com/codelabs/firebase-cloud-fun ctions • Empieza
a usar Cloud Functions para Firebase - Firecasts https://www.youtube.com/watch?v=DYfP-UIKxH0&list=PLl-K7zZEsYLk PZHe41m4jfAxUi0JjLgSM • Cloud Functions para Firebase https://firebase.google.com/docs/functions?hl=es
¿Preguntas? Maribel Maisano • @maribelmai Android Developer WTM Ambassador •
GDG & WTM Buenos Aires
¡Muchas gracias! Maribel Maisano • @maribelmai Android Developer WTM Ambassador
• GDG & WTM Buenos Aires