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
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
660
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
160
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
Fluid Templating in TYPO3 14
s2b
0
130
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
ThorVG Viewer In VS Code
nors
0
770
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
320
Making the Leap to Tech Lead
cromwellryan
135
9.7k
The SEO Collaboration Effect
kristinabergwall1
0
350
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
98
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Design in an AI World
tapps
0
140
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
We Are The Robots
honzajavorek
0
160
Music & Morning Musume
bryan
47
7.1k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
220
A designer walks into a library…
pauljervisheath
210
24k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
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