【发布时间】:2021-03-09 01:42:02
【问题描述】:
我正在尝试使用 Google Cloud SDK 部署一个简单的功能。这是一个简单的函数:
exports.newFunction = async (msg, ctx) => {
console.log('Hello World')
}
并根据this link 使用设置(如区域、触发器等)进行部署。
但我真的很怀念使用 Firebase 的功能,我可以在代码中使用设置(在本例中为区域和触发器)部署功能,如下所示:
exports.newFunction = functions.region('asia-east2').pubsub.schedule('every 1 minutes')
.onRun(async (context) => {
console.log('Hello World')
}
我知道我仍然可以使用 firebase SDK 部署它,但我仍然想知道 Google Cloud SDK 是否提供此功能。有没有可能的方法?
谢谢!
【问题讨论】:
标签: node.js firebase google-cloud-platform google-cloud-functions