Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ernitingarg/googlecloud-firebase-js-backend-functions
https://github.com/ernitingarg/googlecloud-firebase-js-backend-functions
Last synced: about 4 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/ernitingarg/googlecloud-firebase-js-backend-functions
- Owner: ernitingarg
- Created: 2022-05-22T13:26:00.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-05-22T13:32:56.000Z (over 2 years ago)
- Last Synced: 2023-10-21T13:23:10.353Z (about 1 year ago)
- Language: JavaScript
- Size: 10.2 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Local enviornment setup
- Launch visual studio code as administrator
- Remove `node_modules` (if any)
- Remove `package-lock.json` (if any)
- npm cache clean -f
- Run `npm install` which will install all dependecies specified in `package.json`
- To debug locally, go to `package.json` => `scripts` and click on `Debug` link appear above it. (todo: more steps to be added)# Change the APY
```bash
# change the APY_PER_DAY
vim /index.js# deploy
gcloud functions deploy rebase
```# Deploy HTTP functions
```bash
gcloud auth login
gcloud config set project# new function deployment
gcloud functions deploy --runtime nodejs10 --trigger-httpgcloud functions deploy withdrawal_request --runtime=nodejs10 --trigger-http
gcloud functions deploy withdrawal_cancel --runtime=nodejs10 --trigger-http
gcloud functions deploy withdrawal_done --runtime=nodejs10 --trigger-http
gcloud functions deploy conversion_request --runtime=nodejs10 --trigger-http# existing function deployment
gcloud functions deploygcloud functions deploy withdrawal_request
gcloud functions deploy withdrawal_cancel
gcloud functions deploy withdrawal_done
gcloud functions deploy conversion_request
```# Deploy pub/sub functions
```bash
# new function deployment
gcloud functions deploy --runtime=nodejs10 --trigger-topic=gcloud functions deploy conversion_batch --runtime=nodejs10 --trigger-topic=convert_trigger
gcloud functions deploy distribute_interest --runtime=nodejs10 --trigger-topic=interest_timer
gcloud functions deploy rebase --runtime=nodejs10 --trigger-topic=rebase_timer
gcloud functions deploy rebalance_usds --runtime=nodejs10 --trigger-topic=rebalance_usds_timer
gcloud functions deploy update_balance_usds --runtime=nodejs10 --trigger-topic=usds_watcher_timer
gcloud functions deploy usds_watcher --runtime=nodejs10 --trigger-topic=usds_watcher_timer
gcloud functions deploy rebase_watcher --runtime=nodejs10 --trigger-topic=rebase_watcher# existing function deployment
gcloud functions deploygcloud functions deploy conversion_batch
gcloud functions deploy distribute_interest
gcloud functions deploy rebase
gcloud functions deploy rebalance_usds
gcloud functions deploy update_balance_usds
gcloud functions deploy usds_watcher
gcloud functions deploy rebase_watcher
```