How to initialize Firebase admin in Cloud Function.

I have a google cloud function That will send data from machine in Firebase Realtime database using MQTT broker. Previously I was running this code on virtual machine(VM) gcp everything was working fine i was getting data in Realtime database. i also tried this code in my local system every thing is working fine. But when i tried to run the same code on cloud function I was getting some error i have fixed some of them but i was not able to fix this error `Warning, FIREBASE_CONFIG and GCLOUD_PROJECT environment variables are missing. Initializing firebase-admin will fail` You can see my code and detail information here 

0 0 420
0 REPLIES 0