How to use firebase cloud functions
Issue #667
Use node 10
Edit package.json
Secret key
Go to settings/serviceaccounts/adminsdk
, download secret key in form of json
and place it in lib/config.json
1 | const serviceAccount = require('./config.json') |
Local serve
This builds and spins up emulator to test
CORS
- https://stackoverflow.com/questions/42755131/enabling-cors-in-cloud-functions-for-firebase
- https://mhaligowski.github.io/blog/2017/03/10/cors-in-cloud-functions.html
1 | var cors = require('cors'); |
Updated at 2020-06-14 21:39:27