Skip to content

Commit

Permalink
fix(firebase): use local file for firebase configuration
Browse files Browse the repository at this point in the history
fixes #17
  • Loading branch information
Lutonite committed Sep 28, 2022
1 parent ff8197c commit bb74212
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
DISCORD_TOKEN=
REDIS_URL=redis://127.0.0.1:6379
FIREBASE_PROJECT_ID=
FIREBASE_CLIENT_EMAIL=
FIREBASE_PRIVATE_KEY=
FIREBASE_CREDENTIALS_PATH=
TWITCH_CLIENT_ID=
TWITCH_CLIENT_SECRET=
TWITCH_SUBSCRIPTION_SECRET=
Expand Down
9 changes: 1 addition & 8 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ dayjs.extend(relativeTime);
dayjs.extend(dayjsParser);

initializeApp({
credential: cert({
projectId: process.env.FIREBASE_PROJECT_ID,
clientEmail: process.env.FIREBASE_CLIENT_EMAIL,
privateKey: Buffer.from(
process.env.FIREBASE_PRIVATE_KEY ?? '',
'base64',
).toString('utf-8'),
}),
credential: cert(process.env.FIREBASE_CREDENTIALS_PATH ?? ''),
});

container.database = getFirestore();
Expand Down

0 comments on commit bb74212

Please sign in to comment.