Learn R Programming

firebase (version 1.0.2)

config: Config

Description

Configure Firebase, either using a config file or by setting environment variables (see section below).

Usage

firebase_config(
  api_key,
  project_id,
  auth_domain = NULL,
  storage_bucket = NULL,
  app_id = NULL,
  database_url = NULL,
  overwrite = FALSE
)

Value

Path to file.

Arguments

api_key

API key of your project.

project_id

Id of your web project.

auth_domain

Authentication domain, if NULL attempts to build firebase's default domain.

storage_bucket

URl to the bucket. if NULL attempts to build firebase's default storage domain.

app_id

Application ID, necessary for Analytics.

database_url

URL to the database, required to use the RealtimeDatabase.

overwrite

Whether to overwrite any existing configuration file.

Environment Variables

  • FIREBASE_API_KEY

  • FIREBASE_PROJECT_ID

  • FIREBASE_AUTH_DOMAIN

  • FIREBASE_STORAGE_BUCKET

  • FIREBASE_APP_ID

  • FIREBASE_DATABASE_URL

Details

Creates the configuration file necessary to running fireblaze. Note that if you changed the project you must use said ID here, not the one originally created by Google.

Classes of the package look first for the configuration file then, if not found look for the environment variables.

Examples

Run this code
if (FALSE) firebase_config("xXxxx", "my-project")

Run the code above in your browser using DataLab