-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from dali-lab/add-blog-endpoint
feat: store uploaded files in firebase
- Loading branch information
Showing
7 changed files
with
866 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import dotenv from 'dotenv'; | ||
import admin from 'firebase-admin'; | ||
|
||
// initialize dotenv here in case env variable was not yet available | ||
if (!process.env.FIREBASE_API_KEY) { | ||
dotenv.config({ silent: true }); | ||
} | ||
|
||
admin.initializeApp({ | ||
credential: admin.credential.cert(JSON.parse(process.env.FIREBASE_API_KEY)), | ||
storageBucket: 'gs://pine-beetle-prediction.appspot.com', | ||
}); | ||
|
||
export default admin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.