0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Firebaseの初期化設定

Posted at

Firestore Databaseを初期化するときに躓いたのでその備忘録

firebase.js
import { initializeApp, getApps } from "firebase/app";
import {getFirestore} from "firebase/firestore"
import 'firebase/firestore';

const firebaseConfig = {
//apikey, authdomain, projectId, strageBucket, messagingSenderId, appId の情報を入力
  };

let db;

if (!getApps().length) {
  const app = initializeApp(firebaseConfig);
  db = getFirestore(app);
}

export default db
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?