【发布时间】:2018-10-07 10:55:33
【问题描述】:
我正在用Nuxt.js 和Firebase 编写一个网络应用程序。我需要在哪个文件中初始化Firebase?也就是说,这段代码sn-p放在哪里?
var config = {
apiKey: "xxxxxxxxxx",
authDomain: "xxxxxxxxx.firebaseapp.com",
databaseURL: "https://xxxxxxxx.firebaseio.com",
projectId: "xxxxxxxxx",
storageBucket: "xxxxxxxxxxx.appspot.com",
messagingSenderId: "xxxxxxxxxx"
};
firebase.initializeApp(config);
【问题讨论】: