Last active
August 31, 2023 21:00
-
-
Save 1206yaya/06cb8603ffd831f78ef572df7474e008 to your computer and use it in GitHub Desktop.
Firebase Cloud Functions
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
import * as admin from "firebase-admin" | |
import * as functions from "firebase-functions" | |
import * as logger from "firebase-functions/logger" | |
import * as firestore from "@google-cloud/firestore" | |
// This file: https://gist.github.com/1206yaya/06cb8603ffd831f78ef572df7474e008 | |
// const SECRET_NAME = defineString('SECRET_NAME'); | |
// https://firebase.google.com/docs/functions/typescript | |
export const helloWorld = functions.https.onRequest((request, response) => { | |
logger.info("Hello logs!", { structuredData: true }); | |
response.send("Hello from Firebase! " + " " + process.env.foo); | |
// response.send("Hello from Firebase! SECRET_NAME: " + SECRET_NAME.value() + " " + process.env.foo); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment