Firebase Project README
This README provides instructions for local development and deployment of the Firebase project.
Firebase Workflow
There is only one Firebase project you need to work with: Overlevered. On Firebase the project ID is flashcards-b2cb7.
You can run local emulators using this project ID or you can use the firebase use command to switch to the project ID.
Our firebase config has another project local-over-levered which is used for local development.
Local Development
To start local development, follow these steps:
- Clone the repository:
git clone <repository-url> - Install dependencies:
npm install - Build the JS files:
npm run build - Run the project locally:
npm run serve - Run the stripe cli to receive webhook events:
npm run stripe:listen
Making changes
Currently, every time you make a change to the index.ts functions file you need to rebuild and restart the server.
Deployment
To deploy the project to Firebase, use the following commands:
- Change into the
functionsdirectory:cd functions - Build the project:
npm run build - Set the correct env vars for production in the
functions/.envfile - Deploy to Firebase:
firebase deploy
That's it! You're now ready to develop and deploy your Firebase project.