Skip to content

Instantly share code, notes, and snippets.

@atakde
Created January 9, 2024 20:11
Show Gist options
  • Save atakde/16a1eb8bd8e5c9dc1e303912e64d1474 to your computer and use it in GitHub Desktop.
Save atakde/16a1eb8bd8e5c9dc1e303912e64d1474 to your computer and use it in GitHub Desktop.
Firebase cloud function example
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