如何在部署到生产命名空间之前,使用 doctl 测试 DigitalOcean 函数?

huangapple go评论74阅读模式
英文:

How can I test the DigitalOcean functions by doctl befor deploying to to a production namespace?

问题

首先,我是新手使用DigitalOcean Functions,我已经通过doctl serverless创建了一些JavaScript命名空间。我的问题是如何使用doctl serverless或类似的方式测试DigitalOcean函数,然后再部署到生产环境?我想在本地运行并进行测试,然后再部署。

我还查看了文档doctl serveless -h

英文:

First, I am new to use the DigitalOcean Functions, I have created some javascript namespace by doctl serverless, my question is how can I test a DigitalOcean functions by doctl serveless or something like that, befor deploying to a production? I want to run locally and do tests befor deploying.

I also had a look at the doc and doctl serveless -h.

答案1

得分: 1

这是如何在本地执行的示例:

使用以下命令执行函数:doctl serverless functions invoke <function_name>

要查看函数列表,您可以输入:

使用以下命令列出函数:doctl serverless functions list
英文:

here is an example of how to do that locally:

doctl serverless functions invoke &lt;function_name&gt;

In order to see your functions list you can type:

doctl serverless functions list

huangapple
  • 本文由 发表于 2023年2月23日 23:55:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/75547251.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定