View db.ts
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 {SecretManagerServiceClient} from '@google-cloud/secret-manager'; | |
import * as admin from 'firebase-admin'; | |
const client = new SecretManagerServiceClient(); | |
let credentails: admin.app.App; | |
export const db = async (): Promise<admin.app.App> => { | |
if (credentails) { | |
return credentails; |
View db.ts
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 {SecretManagerServiceClient} from '@google-cloud/secret-manager'; | |
import * as admin from 'firebase-admin'; | |
const client = new SecretManagerServiceClient(); | |
let credentials: admin: admin.app.App; | |
let credentials1: admin: admin.app.App; | |
let credentials2: admin: admin.app.App; | |
export const db = async (type: string): Promise<admin: admin.app.App> => { |