【发布时间】:2019-05-12 16:15:43
【问题描述】:
我想在 NodeJS 中使用Google Cloud Storage,但使用google-auth-library 进行身份验证 具体来说:我想在heroku上托管它,所以我想将秘密保存在环境变量中,而不是文件中(因为我必须提交文件才能部署到heroku)。基本上是什么在 auth 库中建议: https://github.com/googleapis/google-auth-library-nodejs#loading-credentials-from-environment-variables
但我似乎无法将生成的客户端传递给 Storage 构造函数?
【问题讨论】:
标签: node.js google-cloud-platform google-cloud-storage google-api-nodejs-client google-auth-library