How to get Firebase Project Name or ID from Cloud Function

后端 未结 6 1413
别跟我提以往
别跟我提以往 2021-01-01 12:25

I am using Cloud Functions and want to get the project name from within one of my Javascript server files. I know that value is stored in the .firebaserc, but I don\'t thin

6条回答
  •  佛祖请我去吃肉
    2021-01-01 13:02

    You can use functions.config().firebase.projectId

    PS the easiest way to initialize app is admin.initializeApp(functions.config().firebase);

提交回复
热议问题