Skip to content

Commit 3c91a8c

Browse files
authored
Merge pull request #7 from druvkotwani/addEnvironmentVariables
added env variable
2 parents 72afa5f + a9c4c02 commit 3c91a8c

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

client/.env

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
VITE_REACT_APP_apiKey=AIzaSyDQ-_Qp-x7ljcWnzB7jtqkyppO0LxGCYfo
2+
VITE_REACT_APP_authDomain=leetcodeprofilesdata.firebaseapp.com
3+
VITE_REACT_APP_projectId=leetcodeprofilesdata
4+
VITE_REACT_APP_storageBucket=leetcodeprofilesdata.appspot.com
5+
VITE_REACT_APP_messagingSenderId=166010246628
6+
VITE_REACT_APP_appId=1:166010246628:web:9ec1a07562ce11d09d23f1
7+
VITE_REACT_APP_measurementId=G-K62NLZLQ5G

client/package-lock.json

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

client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"dependencies": {
1313
"axios": "^1.6.2",
14+
"dotenv": "^16.3.1",
1415
"firebase": "^10.6.0",
1516
"react": "^18.2.0",
1617
"react-dom": "^18.2.0",

client/src/firebase.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { getFirestore } from "firebase/firestore"; // Add Firestore module impor
44

55
// Your web app's Firebase configuration
66
const firebaseConfig = {
7-
apiKey: "AIzaSyDQ-_Qp-x7ljcWnzB7jtqkyppO0LxGCYfo",
8-
authDomain: "leetcodeprofilesdata.firebaseapp.com",
9-
projectId: "leetcodeprofilesdata",
10-
storageBucket: "leetcodeprofilesdata.appspot.com",
11-
messagingSenderId: "166010246628",
12-
appId: "1:166010246628:web:9ec1a07562ce11d09d23f1",
13-
measurementId: "G-K62NLZLQ5G"
7+
apiKey: import.meta.env.VITE_REACT_APP_apiKey,
8+
authDomain: import.meta.env.VITE_REACT_APP_authDomain,
9+
projectId: import.meta.env.VITE_REACT_APP_projectId,
10+
storageBucket: import.meta.env.VITE_REACT_APP_storageBucket,
11+
messagingSenderId: import.meta.env.VITE_REACT_APP_messagingSenderId,
12+
appId: import.meta.env.VITE_REACT_APP_appId,
13+
measurementId: import.meta.env.VITE_REACT_APP_measurementId
1414
};
1515

1616
// Initialize Firebase

0 commit comments

Comments
 (0)