Created
January 9, 2020 17:18
-
-
Save mateusduraes/c4ef21f921338140e83bb8e5cb6b83e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Database (Firestore) | |
* Authentication | |
* Functions | |
* Triggers | |
Registrando objetos com AngularFire2 - See docs | |
Estrutura do banco | |
{ | |
channels: { | |
1: { | |
title: 'blabla' | |
} | |
}, | |
messages: { | |
1: { | |
channelId: 1, | |
message: 'ola' | |
} | |
} | |
} | |
Listando mensagens com AngularFire2 - See docs | |
db.collection('/messages').where('channelId', 1) | |
Triggers | |
https://firebase.google.com/docs/functions/firestore-events | |
Exemplo push notification | |
onCreate('messages/{id}', () => { | |
// send push | |
}) | |
Exemplo update last message | |
onCreate('messages/{id}', () => { | |
// update last message | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment