Skip to content

Commit 5651ff3

Browse files
authored
Allow storage bucket url and database url to be explicitly defined (#389)
1 parent 0d3095d commit 5651ff3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ if (!process.env.FIREBASE_CONFIG) {
6262
'Warning, estimating Firebase Config based on GCLOUD_PROJECT. Initializing firebase-admin may fail'
6363
);
6464
process.env.FIREBASE_CONFIG = JSON.stringify({
65-
databaseURL: `https://${process.env.GCLOUD_PROJECT}.firebaseio.com`,
66-
storageBucket: `${process.env.GCLOUD_PROJECT}.appspot.com`,
65+
databaseURL: `${process.env.DATABASE_URL}` || `https://${process.env.GCLOUD_PROJECT}.firebaseio.com`,
66+
storageBucket: `${process.env.STORAGE_BUCKET_URL}` || `${process.env.GCLOUD_PROJECT}.appspot.com`,
6767
projectId: process.env.GCLOUD_PROJECT,
6868
});
6969
} else {

0 commit comments

Comments
 (0)