Skip to content

Instantly share code, notes, and snippets.

@locdhthtb
locdhthtb / README.md
Created October 14, 2020 16:15 — forked from CodingDoug/README.md
Realtime Database triggers with Cloud Functions for Firebase - source

Realtime Database triggers with Cloud Functions for Firebase - source

This gist contains the source code in my video series about Realtime Database triggers. You can watch the three parts here:

  1. Part 1 (intro, onCreate)
  2. Part 2 (onUpdate, infinite loops)
  3. Part 3 (onDelete, transactions)

index.ts contains the Cloud Functions code, and dialog.ts contains the script to run

@locdhthtb
locdhthtb / Code.gs
Created October 14, 2020 16:13 — forked from edwinlee/Code.gs
Sync a Google Sheets spreadsheet to a Firebase Realtime database
/**
* Copyright 2019 Google LLC.
* SPDX-License-Identifier: Apache-2.0
*/
function getEnvironment() {
var environment = {
spreadsheetID: "<REPLACE WITH YOUR SPREADSHEET ID>",
firebaseUrl: "<REPLACE WITH YOUR REALTIME DB URL>"
};