File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
- const admin = require ( 'firebase-admin' ) ;
1
+ import { initializeApp , cert } from 'firebase-admin/app' ;
2
2
3
3
function multipleFirebaseApps ( ) {
4
4
// [START firebase_options]
@@ -7,14 +7,14 @@ function multipleFirebaseApps() {
7
7
// All required options are specified by the service account,
8
8
// add service-specific configuration like databaseURL as needed.
9
9
const secondaryAppConfig = {
10
- credential : admin . credential . cert ( secondaryServiceAccount ) ,
10
+ credential : cert ( secondaryServiceAccount ) ,
11
11
// databaseURL: 'https://<DATABASE_NAME>.firebaseio.com'
12
12
} ;
13
13
// [END firebase_options]
14
14
15
15
// [START firebase_secondary]
16
16
// Initialize another app with a different config
17
- const secondary = admin . initializeApp ( secondaryAppConfig , 'secondary' ) ;
17
+ const secondary = initializeApp ( secondaryAppConfig , 'secondary' ) ;
18
18
// Access services, such as the Realtime Database
19
19
// const secondaryDatabase = secondary.database();
20
20
// [END firebase_secondary]
You can’t perform that action at this time.
0 commit comments