https://github.com/cunkz/google-cloud-function-pubsub-to-firestore
Function for Google Cloud Function to CRUD from Pub/Sub to Firestore
https://github.com/cunkz/google-cloud-function-pubsub-to-firestore
cloud-function firebase firestore google google-cloud-platform nodejs pubsub
Last synced: 3 months ago
JSON representation
Function for Google Cloud Function to CRUD from Pub/Sub to Firestore
- Host: GitHub
- URL: https://github.com/cunkz/google-cloud-function-pubsub-to-firestore
- Owner: cunkz
- Created: 2022-02-15T12:55:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-15T12:56:34.000Z (over 3 years ago)
- Last Synced: 2025-01-25T08:26:31.340Z (5 months ago)
- Topics: cloud-function, firebase, firestore, google, google-cloud-platform, nodejs, pubsub
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google Cloud Function for Pub/Sub to Firestore
This repository contains function for Google Cloud Function to transfer message from Pub/Sub to Firestore
## Usage
First, add new Google Cloud Function, then choose your Pub/Sub topic for trigger.
After that, choose NodeJS runtime. Create file index.js and package.json based on this repository.
Don't forget to insert "migratePubSub" for function to be called later.## Additional Information
In migratePubSub function, we use flag "_delete" to split message which for upsert or delete. Example data :
```JSON
{
"id": "lorem",
"label": "ipsum",
"_delete": true
}
```And if you want to remid about pub/sub, maybe you can execute publisher and subscriber from [this repository](https://github.com/cunkz/google-pubsub-nodejs)