Cloud functions needed for TBR Group in-app calls application.
- Use Prettier as the Default Formatter
- Disable ESLint
The project uses 6 secret keys:
- AGORA_RTC_APP_ID — Agora app ID.
- AGORA_RTC_CERTIFICATE — Agora app certificate.
- ONE_SIGNAL_APP_ID — OneSignal app ID for 1st OneSignal app.
- ONE_SIGNAL_REST_API_KEY — OneSignal REST API key for 1st OneSignal app.
- ONE_SIGNAL_VOIP_APP_ID — OneSignal app ID for 2nd OneSignal app.
- ONE_SIGNAL_VOIP_REST_API_KEY — OneSignal REST API key for 2nd OneSignal app . Note: 1st and 2nd OneSignal apps are required according to OneSignal documentation.
The project secretes are stored in the Secret Manager. So you need to add your secrets to the Secret Manager before or during the cloud function deployment to make them work.
To build Cloud Functions, the following have to be installed:
Follow these steps to prepare your functions and deploy:
- Switch your project to there you want to deploy cloud functions
// $PROJECT_ID is a Firebase Project ID (like 'in-app-calls-demo')
firebase use $PROJECT_ID
- Install node modules
cd functions && npm install
- Run deploy script
cd functions && npm run deploy