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
/* | |
Using Cloud Functions, here's what I've come up with for anyone who wants to | |
add a timestamp field in a Firestore document. You need to have the Firebase Admin SDK installed in | |
addition to the general setup for Cloud Functions as detailed in the Firebase documentation. | |
*/ | |
const functions = require('firebase-functions'); | |
// The Firebase Admin SDK to access the Firebase Realtime Database. | |
const admin = require('firebase-admin'); |