initializeServerApp
Creates and initializes a {@link @firebase/app#FirebaseServerApp} instance.
The FirebaseServerApp
is similar to FirebaseApp
, but is intended for execution in
server side rendering environments only. Initialization will fail if invoked from a
browser environment.
See Add Firebase to your app and Initialize multiple projects for detailed documentation.
@example
// Initialize an instance of `FirebaseServerApp`.
// Retrieve your own options values by adding a web app on
// https://console.firebase.google.com
initializeServerApp({
apiKey: "AIza....", // Auth / General Use
authDomain: "YOUR_APP.firebaseapp.com", // Auth with popup/redirect
databaseURL: "https://YOUR_APP.firebaseio.com", // Realtime Database
storageBucket: "YOUR_APP.appspot.com", // Storage
messagingSenderId: "123456789" // Cloud Messaging
},
{
authIdToken: "Your Auth ID Token"
});
function initializeServerApp(options: FirebaseOptions | FirebaseApp, config: FirebaseServerAppSettings): FirebaseServerApp;
§
initializeServerApp(options: FirebaseOptions | FirebaseApp, config: FirebaseServerAppSettings): FirebaseServerApp
[src]§Parameters
§
options: FirebaseOptions | FirebaseApp
[src]Firebase.AppOptions
to configure the app's services, or a aFirebaseApp
instance which contains theAppOptions
within.
§
config: FirebaseServerAppSettings
[src]FirebaseServerApp
configuration.