Firebase backend functions
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.
Setting environment variables
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
- Add the actual keys from the algolia and stripe websites to those files
- Save keys to Firebase servers by running
sh functions/.env.stage, or
You can also simply copy/paste the contents of functions env files in your terminal.