Changed config path for server to use local env files.

This commit is contained in:
Patrick Fic
2020-05-06 17:17:49 -07:00
parent 54320cc53c
commit 33bbcc8c95
12 changed files with 75 additions and 41 deletions

View File

@@ -1,7 +1,10 @@
var admin = require("firebase-admin");
const path = require("path");
require("dotenv").config({ path: path.resolve(process.cwd(), `.env.${process.env.NODE_ENV || 'development'}`) });
console.log(
"Found Firebase AdminSDK JSON",
process.env.NODE_ENV,
!!process.env.FIREBASE_ADMINSDK_JSON
);