我有一個Firebase項目,用戶可以共享包含媒體和文本的一些內容。對於Facebook來處理鏈接,正確共享的內容必須具有預填充頁面(在服務器端動態創建,而不是在具有Firebase JS API的客戶端上)。serviceAccountKey.json在Google App Engine中的Firebase項目的安全路徑Node.js app
所以,我決定使用谷歌的App Engine(GAE)爲這些內容像somedomain.com/?content=hfe84gfjy45xs
var admin = require("firebase-admin");
// Fetch the service account key JSON file contents
var serviceAccount = require("path/to/serviceAccountKey.json");
// Initialize the app with a null auth variable, limiting the server's access
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://databaseName.firebaseio.com",
databaseAuthVariableOverride: null
});
它是安全的URL把path/to/serviceAccountKey.json
文件的項目文件夾中? 我必須將文件放到Google雲端存儲實例嗎?
在此先感謝。