Created
January 9, 2024 20:11
-
-
Save atakde/16a1eb8bd8e5c9dc1e303912e64d1474 to your computer and use it in GitHub Desktop.
Firebase cloud function example
This file contains hidden or 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 admin from 'firebase-admin'; | |
import { setGlobalOptions } from 'firebase-functions/v2'; | |
setGlobalOptions({ | |
maxInstances: 1 | |
}); | |
admin.initializeApp(); | |
const db = admin.firestore(); | |
const messaging = admin.messaging(); | |
const auth = admin.auth(); | |
export { db, messaging, auth }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment