Truy cập vào bảng điều khiển

A Firebase app holds the initialization information for a collection of services.

Do not call this constructor directly. Instead, use admin.initializeApp() to create an app.

Index

Properties

name

name: string

The (read-only) name for this app.

The default app's name is "[DEFAULT]".

example
// The default app's name is "[DEFAULT]"
admin.initializeApp(defaultAppConfig);
console.log(admin.app().name);  // "[DEFAULT]"
example
// A named app's name is what you provide to initializeApp()
var otherApp = admin.initializeApp(otherAppConfig, "other");
console.log(otherApp.name);  // "other"

options

options: AppOptions

The (read-only) configuration options for this app. These are the original parameters given in admin.initializeApp().

example
var app = admin.initializeApp(config);
console.log(app.options.credential === config.credential);  // true
console.log(app.options.databaseURL === config.databaseURL);  // true

Methods