File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ let config = {
9
9
databaseURL : process . env . FIREBASE_DATABASE_URL ,
10
10
storageBucket : process . env . FIREBASE_STORAGE_BUCKET ,
11
11
messagingSenderId : process . env . FIREBASE_MESSAGING_SENDER_ID ,
12
- keyJsonFilePath : process . env . FIREBASE_SERVICE_ACCOUNT_JSON_PATH
12
+ keyJsonFilePath : process . env . FIREBASE_SERVICE_ACCOUNT_JSON_PATH ,
13
+ keyJsonContent : process . env . FIREBASE_SERVICE_ACCOUNT_JSON_CONTENT || require ( process . env . FIREBASE_SERVICE_ACCOUNT_JSON_PATH )
13
14
} ;
14
15
15
16
module . exports = config ;
Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ var MemeNG = function (firebase, config) {
27
27
this . firebase = firebase ;
28
28
this . database = firebase . database ( ) ;
29
29
this . auth = firebase . auth ( ) ;
30
-
31
30
if ( firebase . storage ) {
32
31
this . storage = firebase . storage ( ) ;
33
32
}
34
33
else {
35
34
var gcloud = require ( 'gcloud' ) ( {
36
35
projectId : config . projectId ,
37
- keyFilename : config . keyJsonFilePath
36
+ // keyFilename: config.keyJsonFilePath
37
+ credentials : config . keyJsonContent
38
38
} ) ;
39
39
40
40
var gcs = gcloud . storage ( ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ require('dotenv').config({silent: true});
9
9
10
10
process . env [ 'PROJECT_ROOT' ] = __dirname ;
11
11
process . env [ 'FIREBASE_SERVICE_ACCOUNT_JSON_PATH' ] = __dirname + process . env . FIREBASE_SERVICE_ACCOUNT_JSON_RELATIVE_PATH ;
12
+ // process.env['FIREBASE_SERVICE_ACCOUNT_JSON_CONTENT'] = require(process.env.FIREBASE_SERVICE_ACCOUNT_JSON_PATH);
12
13
14
+ // console.log(require(process.env.FIREBASE_SERVICE_ACCOUNT_JSON_PATH).type);
13
15
// Start the app
14
16
require ( './app/app' ) ;
You can’t perform that action at this time.
0 commit comments