edit .env for firebase
This commit is contained in:
parent
79f2042536
commit
c229ad4f59
|
@ -1,7 +1,7 @@
|
||||||
# FIREBASE
|
# FIREBASE
|
||||||
# cert data to string
|
FIREBASE_CERT_PROJECT_ID =
|
||||||
FIREBASE_CERT = "JSON.stringify(the_file)"
|
FIREBASE_CERT_CLIENT_EMAIL =
|
||||||
|
FIREBASE_CERT_PRIVATE_KEY =
|
||||||
|
|
||||||
# DISCORD
|
# DISCORD
|
||||||
# discord bot token
|
# discord bot token
|
||||||
|
|
|
@ -4,7 +4,11 @@ import { config } from "dotenv";
|
||||||
config();
|
config();
|
||||||
|
|
||||||
initializeApp({
|
initializeApp({
|
||||||
credential: cert(JSON.parse(process.env.FIREBASE_CERT as string)),
|
credential: cert({
|
||||||
|
projectId: process.env.FIREBASE_CERT_PROJECT_ID,
|
||||||
|
clientEmail: process.env.FIREBASE_CERT_CLIENT_EMAIL,
|
||||||
|
privateKey: process.env.FIREBASE_CERT_PRIVATE_KEY?.replace(/\\n/g, "\n"),
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
const db = getFirestore();
|
const db = getFirestore();
|
||||||
|
|
Loading…
Reference in a new issue