everydaycats commited on
Commit
f8e692f
·
verified ·
1 Parent(s): a52af75

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +5 -4
app.js CHANGED
@@ -12,11 +12,12 @@ let db = null;
12
  try {
13
  // The env secret MUST contain the full JSON string
14
  // exactly like the serviceAccountKey.json contents
15
- const serviceAccount = JSON.parse(process.env.FIREBASE_SERVICE_ACCOUNT_JSON);
16
- console.log(serviceAccount);
17
 
18
- if (serviceAccount !== {}) {
19
- admin.initializeApp({
 
 
 
20
  credential: admin.credential.cert(serviceAccount),
21
  databaseURL: "https://YOUR-FIREBASE-PROJECT.firebaseio.com" // REPLACE THIS
22
  });
 
12
  try {
13
  // The env secret MUST contain the full JSON string
14
  // exactly like the serviceAccountKey.json contents
 
 
15
 
16
+ if (process.env.FIREBASE_SERVICE_ACCOUNT_JSON !== "") {
17
+ const serviceAccount = JSON.parse(process.env.FIREBASE_SERVICE_ACCOUNT_JSON);
18
+ console.log(serviceAccount);
19
+
20
+ admin.initializeApp({
21
  credential: admin.credential.cert(serviceAccount),
22
  databaseURL: "https://YOUR-FIREBASE-PROJECT.firebaseio.com" // REPLACE THIS
23
  });