1.0.4 • Published 1 year ago

create-firebase-store v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

create-firebase-store

A simple package to create a Firebase Firestore database.

Installation

npm install create-firebase-store

Usage

import createFirebaseStore from "create-firebase-store"

const firebaseConfig = {
  apiKey: "YOUR_API_KEY",
  authDomain: "YOUR_AUTH_DOMAIN",
  projectId: "YOUR_PROJECT_ID",
  storageBucket: "YOUR_STORAGE_BUCKET",
  messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
  appId: "YOUR_APP_ID",
  measurementId: "YOUR_MEASUREMENT_ID",
}

const store = createFirebaseStore(firebaseConfig)

API

ValueParameters
signOut
signInWithEmailAndPasswordemail, password
onAuthStateChangedcallback
getDocpath
setDocpath, value
updateDocpath, value