- Run
npm i
from the root project folder - Have java installed
- Install Google Cloud SDK
- Login to the account linked to the ibc-wallet projects
- For testing, select the project 'ibc-wallet' (you can switch that later once you're ready to deploy to the production project by runing
firebase use byui-ibc-wallet
)
- To run the functions locally against mock data: follow these instructions with the folder structure bellow in mind
- After that your project structure should have something like this:
FirebaseFunctions/ ├─ ... ├─ privateKeys/ │ └─ ibc-wallet-firebase-adminsdk-xxxxxxxxxx.js (the generated key file from Firebase settigns) ├─ testDatabase/ │ └─ mockDB.js (the imported DB from dev or prod) ├─ ...
- Finally, for running/testing:
npm start
Deploy all changes: firebase deploy
Deploy specific function(s): firebase deploy --only "functions:functionNameHere"
Debug a deploy: firebase --debug deploy
To test Pub/Sub Functions you will need to deploy them, and please do so to ibc-wallet (the dev one) See help and examples for schedule format