Skip to content

Commit 5f02a1e

Browse files
committed
created a .env to store secrets
1 parent 1b08ed3 commit 5f02a1e

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

services/user-service/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copy this file to .env and fill in your own values
2+
GOOGLE_APPLICATION_CREDENTIALS="path/to/your/serviceAccountKey.json"

services/user-service/firebase-admin-config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
require("dotenv").config();
12
const admin = require("firebase-admin");
23

3-
const serviceAccount = require("./serviceAccountKey.json");
4+
const serviceAccount = process.env.GOOGLE_APPLICATION_CREDENTIALS;
45

56
admin.initializeApp({
67
credential: admin.credential.cert(serviceAccount),

services/user-service/package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/user-service/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"type": "commonjs",
1313
"dependencies": {
1414
"cors": "^2.8.5",
15+
"dotenv": "^17.2.2",
1516
"express": "^5.1.0",
1617
"firebase-admin": "^13.5.0",
1718
"http-proxy-middleware": "^3.0.5"

0 commit comments

Comments
 (0)