Skip to content
Go to file
Cannot retrieve contributors at this time
17 lines (10 sloc) 1 KB

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.

Documentation for Firebase Functions

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.

  1. First you'll have to remove ".example" from the filename of the .env files in functions/
  2. Add the actual keys from the algolia and stripe websites to those files
  3. Save keys to Firebase servers by running sh functions/, sh functions/.env.stage, or sh functions/

You can also simply copy/paste the contents of functions env files in your terminal.

You can’t perform that action at this time.