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
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
AI & Enginnering
codelynx
0
110
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
MUSUBIXとは
nahisaho
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
190
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
240
Data-Centric Kaggle
isax1015
2
770
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
720
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
36k
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
First, design no harm
axbom
PRO
2
1.1k
WENDY [Excerpt]
tessaabrams
9
36k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
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