Contents
alternate_email

  ondemand_video   animation
Reviewed: 2021-05-28

For Developers

Steps to create a new server instance

Create new firebase project

- results in a {FIREBASEPROJECTID}
- you can also bind a url to this

Create Realtime Database

- main database

Enable User Authentication

- enable anonymous - this is for Asset Viewer (/view) and Display App (/display)
- enable Google - this is for Asset Manager (/asset); optional
- enable email/passwordless - this is for Asset Manager (/asset); optional
- only enable anonymous for production - recommended at this time - to prevent /asset access - another option is to only enable the Firebase default route - not a configured url for access

Create Firestore Instance

- select region - will also create bucket storage - this is only for configuration but will be the main database in a later release

Initialize token for access

- add to Firestore privateConfiguration->security->token: "{TOKENVALUE}" - the {TOKENVALUE} (you set it) and the Firebase Project id will be the 2 values needed for the addon

Enable billing

- blaze plan to support cloud functions

Upload Code

Code needs to be uploaded twice - once for hosting then a second time for cloud functions. The cloud functions load some routines from the hosted website (javascript).
firebase deploy -P {FIREBASEPROJECTID} --only hosting
firebase deploy -P {FIREBASEPROJECTID} --only functions

Configure CORS for bucket

Important: CORS headers need to be set on the google bucket associated with the project
GCP Reference Example cors.json - this file also lives in the code root directory.
gcloud auth login
- then follow steps to authenticate (if needed)
gsutil cors set cors.json gs://{FIREBASEPROJECTID}.appspot.com
-- execute from directory where the cors.json file exists (or path this cmd better).

Enable backup for RTDB

If using the Asset Manager (/asset) to create content, it's recommended to enable daily backups on RTDB to prevent expected data loss.