mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 15:09:47 +00:00
15 lines
422 B
TypeScript
15 lines
422 B
TypeScript
import * as firestore from '@google-cloud/firestore'
|
|
import * as config from './config'
|
|
|
|
export let db: firestore.Firestore = null
|
|
export let images: firestore.CollectionReference = null
|
|
|
|
if (config.isPreviewImageSupportEnabled) {
|
|
db = new firestore.Firestore({
|
|
projectId: config.googleProjectId,
|
|
credentials: config.googleApplicationCredentials
|
|
})
|
|
|
|
images = db.collection(config.firebaseCollectionImages)
|
|
}
|