firebase - How to disable Firebase Storage emulator?
问题描述
When I start the emulators, the Storage emulator starts and is available at localhost:9199.
Then I access storage with the admin SDK in node.js with:
serviceAccountKey = require('./serviceAccountKey.json');
const config = {
credential: admin.credential.cert(serviceAccountKey),
};
const adminApp = admin.initializeApp(config);
const storage = adminApp.storage();
Now storage points to the emulator, not the real service as before this emulator has been implemented.
How can I get access to the real service?
I have tried setting projectId and the env variable as described here, but it does not work.
解决方案
OK, so the way is simply to start all services but storage from the command line, and not from firebase.json, this way:
firebase emulators:start --only hosting,functions,firestore,auth,ui
推荐阅读
- angularjs - 如何触发元素点击角度js?
- javascript - Firebase 存储错误:发生未知错误
- android - Android Architecture Navigation 组件和 Proguard 导致 java.lang.ClassNotFoundException
- ibm-mobilefirst - IBM MobileFirst - IPV6 上的 Android 连接错误
- android - 矢量可绘制图像视图上的洪水填充算法
- gulp - gulp watch 任务引发的 UNKNOWN 错误
- python - 如何通过计算过滤查询集?
- ruby - 按百分比选择数组中的项目
- autoconf - 为 OpenMPI 1.3 定义宏
- php - PHP MySQL双重提交使用两个SESSION