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.
// 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"
});
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.
// 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"
});
§Parameters
Firebase.AppOptions
to configure the app's services, or a aFirebaseApp
instance which contains theAppOptions
within.
- Optional
FirebaseServerApp
settings.
Creates and initializes a {@link @firebase/app#FirebaseServerApp} instance.
§Parameters
- Optional
FirebaseServerApp
settings.