This folder contains a little backend code for updating our search index when a post changes, keeping subscriptions in sync with stripe, and updating the number of likes on each post, etc.
Documentation for Firebase Functions
Before running backend functions, you have to give Firebase your secret API keys. This can be done manually using the Firebase CLI.
For your convenience, Firefly makes this a little easier by including .env
files in the functions directory.
- First you'll have to remove ".example" from the filename of the
.env
files infunctions/
- Add the actual keys from the algolia and stripe websites to those files
- Save keys to Firebase servers by running
sh functions/.env.dev
,sh functions/.env.stage
, orsh functions/.env.live
You can also simply copy/paste the contents of functions env files in your terminal.