Note: This guide may not be perfect. If you experience any issues let us know!
- Download firebase CLI:
npm install -g firebase-toolsThe install location for the firebase CLI might not be automatically added to your
PATH. If this is the case, just make sure you find where the CLI executable was
installed and add it to your PATH.
- Login to your google account that has access to the firebase project. This should open up a browser window for you to login and grant permissions to the CLI tool.
firebase login-
Go to the backend directory, then go to the functions directory and run
npm installandnpm run build. -
Go back to the backend directory, run
firebase emulators:start. This might take a few seconds, especially if it's donwloading the emulators for the first time. Once complete, you should see a table of emulators, hosts/ports and links to the emulator UI. Above that, there should be a link to the main emulator UI. Click that. If everything is setup correctly, you should see the firebase emulator UI in your browser with the Authentication, Firestore, Realtime Database, Functions, Storage, Hosting, and Extensions Emulator with the green On status.To run
firebase emulators:startyou may need to install Java. To do this, find the latest version of the Java installer through the Oracle website, run the installer, and finally add Java to your path variables. You may need to do this even if you have Java through Eclipse.
During testing, you may want to run the emulators with persisting mock data, such as
your user information or a mock form. We have included two mock data folders to start
with, ./emulator_data and ./emulator_data2. To start the emulators with this data,
run the following:
firebase emulators:start --export-on-exit=./emulator_data --import=./emulator_data
Replace ./emulator_data with whatever directory you want to store/use the data in. Also,
omit --export-on-exit if you don't intend to save changes. Be careful not to
unintentionally commit and push mock data.