【问题标题】:Is it possible to use file system instead of actual Storage bucket in the cloud for development purposes (Google Cloud Platform)是否可以在云中使用文件系统而不是实际的存储桶进行开发(谷歌云平台)
【发布时间】:2021-11-02 00:28:46
【问题描述】:

我正在使用@google-cloud/storage npm 包访问 GCP 存储中的存储桶,在生产环境中一切正常,但我想在本地开发期间使用本地文件系统,这样一方面任何垃圾都不会另一方面,出现在 prod env 中我不会影响其他开发人员。

如果这无法实现,在本地开发期间使用 @google-cloud/storage 的最佳方式是什么?

【问题讨论】:

    标签: node.js google-cloud-platform google-cloud-storage filesystems


    【解决方案1】:

    一些服务有模拟器:

    https://cloud.google.com/sdk/gcloud/reference/beta/emulators

    似乎有任何模拟器通过 Firebase 提供有限(!)云存储功能,但我没有使用它:

    https://firebase.google.com/docs/emulator-suite/connect_storage

    我不清楚您将如何使用非 Firebase Storage SDK 中的 Cloud Storage 模拟器,但它应该工作,因为它将实现底层 API。也许使用ClientOptions 覆盖默认服务端点。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-06-17
      • 1970-01-01
      • 2023-02-08
      • 2020-03-29
      • 1970-01-01
      • 2020-06-01
      • 2012-05-17
      相关资源
      最近更新 更多