These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Supported node version: 14
npm install -g firebase-tools
The project is build entirely for Google Cloud Firebase.
If you want to develop for an existing project, ask the project admin to add you as a user for that firebase project.
You can create and/or manage firebase projects here.
Once you have setup your firebase project, continue below.
firebase login
firebase use --add
(follow instructions)
When your project was succesfully selected, it will be stored in the file called: .firebasesrc
Create a file .env
in the root this project with the following content:
FIREBASE_API_KEY=xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxx
FIREBASE_AUTH_DOMAIN=xxxxxxxx.firebaseapp.com
FIREBASE_PROJECT_ID=xxxxxxxxxxxx
FIREBASE_STORAGE_BUCKET=xxxxxxxx.appspot.com
(The values for these secrets can be found on your firebase console)
Install dependencies
npm install
Build common package (only needed once)
npm run build:refs
Start development server (open http://localhost:5000/
)
npm run start
Before you can run tests, you must start the firestore emulator.
npm run emulators
Keep the emulator running in one terminal window while running tests in another terminal.
npm run test
If you only need to run the test once, you can use:
npm run test:emulator
This will start the emulator, run the tests and finally also stop the firebase emulator.
A google cloud build trigger has been setup for CI/CD purposes for this repo.
For pull requests, and commits on master branch, google cloud build will use cloudbuild.build.yaml
.
Each time a release tag v0.0
is pushed to the repository, a build will start using cloudbuild.deploy.yaml
and deploy the project.
See these files for information of the build steps.