mirror of
https://github.com/DerTyp7/apartment-altenau-nextjs.git
synced 2025-10-29 12:52:12 +01:00
put firebase api in .env (old values are outdated)
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -19,6 +19,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
*.pem
|
*.pem
|
||||||
|
|
||||||
|
|
||||||
# debug
|
# debug
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
@@ -27,6 +28,7 @@ yarn-error.log*
|
|||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
.env*.local
|
.env*.local
|
||||||
|
.env
|
||||||
|
|
||||||
# vercel
|
# vercel
|
||||||
.vercel
|
.vercel
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -6,3 +6,13 @@ This app functions as a flyer for the apartment in Altenau. It has no booking fu
|
|||||||
|
|
||||||
We use Firebase for the backend. The app is configured to use the Firebase project `altenau-apartment`.
|
We use Firebase for the backend. The app is configured to use the Firebase project `altenau-apartment`.
|
||||||
Texts based on languages are stored in the `localeTexts` collection. Since NextJS caches the HTML file its not bad to always fetch the texts from the database.
|
Texts based on languages are stored in the `localeTexts` collection. Since NextJS caches the HTML file its not bad to always fetch the texts from the database.
|
||||||
|
|
||||||
|
## .env file
|
||||||
|
|
||||||
|
FIREBASE_API_KEY=""
|
||||||
|
FIREBASE_AUTH_DOMAIN=""
|
||||||
|
FIREBASE_PROJECT_ID=""
|
||||||
|
FIREBASE_STORAGE_BUCKET=""
|
||||||
|
FIREBASE_MESSAGING_SENDER_ID=""
|
||||||
|
FIREBASE_APP_ID=""
|
||||||
|
FIREBASE_MEASUREMENT_ID=""
|
||||||
|
|||||||
@@ -2,15 +2,25 @@ import { getFirestore } from "@firebase/firestore";
|
|||||||
import { initializeApp } from "firebase/app";
|
import { initializeApp } from "firebase/app";
|
||||||
|
|
||||||
const firebaseConfig = {
|
const firebaseConfig = {
|
||||||
apiKey: "AIzaSyBpj2FZEONb_Qpca4-brCzB0OVJPf3l8hk",
|
apiKey: process.env.FIREBASE_API_KEY,
|
||||||
authDomain: "apartment-f960a.firebaseapp.com",
|
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
|
||||||
projectId: "apartment-f960a",
|
projectId: process.env.FIREBASE_PROJECT_ID,
|
||||||
storageBucket: "apartment-f960a.appspot.com",
|
storageBucket: process.env.FIREBASE_STORAGE_BUCKET,
|
||||||
messagingSenderId: "1007134515151",
|
messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,
|
||||||
appId: "1:1007134515151:web:9ff0216c618b55a571bcba",
|
appId: process.env.FIREBASE_APP_ID,
|
||||||
measurementId: "G-RMSZVM1BCG",
|
measurementId: process.env.FIREBASE_MEASUREMENT_ID,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log({
|
||||||
|
apiKey: process.env.FIREBASE_API_KEY,
|
||||||
|
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
|
||||||
|
projectId: process.env.FIREBASE_PROJECT_ID,
|
||||||
|
storageBucket: process.env.FIREBASE_STORAGE_BUCKET,
|
||||||
|
messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,
|
||||||
|
appId: process.env.FIREBASE_APP_ID,
|
||||||
|
measurementId: process.env.FIREBASE_MEASUREMENT_ID,
|
||||||
|
});
|
||||||
|
|
||||||
const app = initializeApp(firebaseConfig);
|
const app = initializeApp(firebaseConfig);
|
||||||
|
|
||||||
export const db = getFirestore();
|
export const db = getFirestore();
|
||||||
|
|||||||
Reference in New Issue
Block a user