英文:
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 <function_name>
In order to see your functions list you can type:
doctl serverless functions list
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论