mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-29 03:52:20 -04:00
Make local DEV work out of the box
This commit is contained in:
@@ -1,16 +1,12 @@
|
||||
import * as admin from 'firebase-admin'
|
||||
|
||||
import { getServiceAccountCredentials } from 'common/secrets'
|
||||
|
||||
export const getLocalEnv = () => {
|
||||
return (process.env.ENV?.toUpperCase() ?? 'STAGING') as 'PROD' | 'DEV'
|
||||
}
|
||||
import {getServiceAccountCredentials} from "shared/firebase-utils";
|
||||
|
||||
// Locally initialize Firebase Admin.
|
||||
export const initAdmin = () => {
|
||||
try {
|
||||
const env = getLocalEnv()
|
||||
const serviceAccount = getServiceAccountCredentials(env)
|
||||
const serviceAccount = getServiceAccountCredentials()
|
||||
console.log(
|
||||
`Initializing connection to ${serviceAccount.project_id} Firebase...`
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user