Socket
Socket
Sign inDemoInstall

@firebase/app

Package Overview
Dependencies
3
Maintainers
3
Versions
3265
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @firebase/app

The primary entrypoint to the Firebase JS SDK


Version published
Weekly downloads
1.9M
increased by4.88%
Maintainers
3
Created
Weekly downloads
 

Package description

What is @firebase/app?

The @firebase/app package is the core module of the Firebase JavaScript SDK. It initializes and configures the Firebase app, allowing other Firebase services to be used in web and Node.js applications. It provides the necessary infrastructure to manage the communication between your app and Firebase services.

What are @firebase/app's main functionalities?

Initialization

This feature allows you to initialize your Firebase application using your project's configuration. The configuration includes keys and identifiers for your project.

import { initializeApp } from 'firebase/app';
const firebaseConfig = {
  apiKey: 'API_KEY',
  authDomain: 'PROJECT_ID.firebaseapp.com',
  projectId: 'PROJECT_ID',
  storageBucket: 'PROJECT_ID.appspot.com',
  messagingSenderId: 'SENDER_ID',
  appId: 'APP_ID'
};
const app = initializeApp(firebaseConfig);

Accessing Firebase Services

After initializing the Firebase app, you can access various Firebase services such as authentication and Firestore database by importing and initializing them with the app instance.

import { getAuth } from 'firebase/auth';
import { getFirestore } from 'firebase/firestore';
const auth = getAuth(app);
const db = getFirestore(app);

Other packages similar to @firebase/app

Readme

Source

@firebase/app

This is the primary entrypoint to the Firebase JS SDK. All apps using firebase will need this package. Other @firebase packages are typically mounted on to the namespaces exposed by this package.

Installation

You can install this package by running the following in your project:

$ npm install @firebase/app

Usage

You can then use the firebase namespace exposed by this package as illustrated below:

ES Modules

Referencing the firebase export:

import { firebase } from '@firebase/app';

// Do stuff w/ `firebase`

Referencing the default export:

import firebase from '@firebase/app';

// Do stuff w/ `firebase`

CommonJS Modules

const firebase = require('@firebase/app').default;

// Do stuff with `firebase`

Documentation

For comprehensive documentation please see the Firebase Reference Docs.

FAQs

Last updated on 12 Mar 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc