Skip to content

Instantly share code, notes, and snippets.

View hheimbuerger's full-sized avatar
👨‍👧‍👦
Parenting

Henrik Heimbuerger hheimbuerger

👨‍👧‍👦
Parenting
View GitHub Profile
@saintplay
saintplay / counter.function.js
Last active October 17, 2021 17:00
Add counter for Firestore Collection
// functions/income/counter.function.js
'use strict'
const functions = require('firebase-functions')
const admin = require('firebase-admin')
// Prevent firebase from initializing twice
try { admin.initializeApp(functions.config().firebase) } catch (e) {}