“envidio” Código de respuesta

envidio

On .env.local file you have to write
//All "" will have to remove
REACT_APP_FIREBASE_API_KEY=
REACT_APP_FIREBASE_AUTH_DOMAIN=
REACT_APP_FIREBASE_PROJECT_ID=
REACT_APP_FIREBASE_STORAGE_BUCKET=
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=
REACT_APP_FIREBASE_APP_ID=
Zany Zebra

envidio

const firebaseConfig = {
    apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
    authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN,
    projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID,
    storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET,
    messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID,
    appId: process.env.REACT_APP_FIREBASE_APP_ID,
  };
  
  Then import it otherwise it will not work
Zany Zebra

Variables de entorno de Firebase

$ cd project_directory
$ cd functions
$ firebase functions:config:set api_key1="YOUR_API_KEY1" api_key2="YOUR_API_KEY2"

// Accessing the Keys in Code

const functions = require('firebase-functions');

const api_key1  = functions.config().api_key1;
const api_key2  = functions.config().api_key2;
Inquisitive Iguana

Respuestas similares a “envidio”

Preguntas similares a “envidio”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código