-
-
Notifications
You must be signed in to change notification settings - Fork 4
Running Locally
-
start:emulator
- Starts all required firebase emulators. This includes firestore, storage, auth and hosting, if you end up adding anything else you'll need to include it in the emulators as well by adding it tofirestore.json
. By default data is persisted between runs, but you can prevent it by removing--export-on-exit=.emulator-export --import=.emulator-export
from the script. -
start:cms
- Runs the client app in watch mode. Alternativelystart:cms:live
targets the live project rather then the emulator. -
start:functions:watch
- Runs the functions in watch mode. -
start:setup
- seeds the data with collections defined insetup/collections
.
You can run everything at once with npm run dev
this will run: functions in watch mode, emulator suite and the client app. However, this is a very resource intensive script and you don't typically need everything running at the same time so we find our self's running npm run start:cms
and npm run start:emulator
more often.
In order to open the cms you'll need to have a user with a role of either "admin" or "user" (or something else if you changed the default). You can run start:setup
to populate the initial user-invites
and then head to the authentication page in your emulator UI and create a user with that email, or alternatively go straight to the authentication page and create a user with custom claims {"role": "admin"}
.
TODO: Answer
You can change any of the default ports in firebase.json
but in case of firstore you'll also need to adjust the port in setup/package.json
and client/integrations/firebase/fb.module.ts
.