gpt4 book ai didi

azure - Azure Functions 中的 .json 文件的用途是什么?

转载 作者:行者123 更新时间:2023-12-02 06:20:59 27 4
gpt4 key购买 nike

看起来有很多种类型,尽管某些项目只包含其中一两种。

在 Visual Studio 预览中创建一个新函数,它会为您提供 host.jsonlocal.settings.json

I've also seen projectsfunction.jsonproject.json

The Function docs说明 function.json 的用途:

The function.json file defines the function bindings and other configuration settings. The runtime uses this file to determine the events to monitor and how to pass data into and return data from function execution.

一个例子:

{
"disabled": false,
"bindings": [
// ... bindings here
{
"type": "bindingType",
"direction": "in",
"name": "myParamName",
// ... more depending on binding
}
]
}

host.json也有一个目的,per the Azure webjobs SDK:

In the root script directory, there should be a host.json metadata file that contains the global configuration options affecting all functions. The Script runtime will map these settings into their corresponding WebHobs SDK JobHostConfiguration settings when initializing the host.

那么 local.settings.jsonproject.json 是做什么的?

最佳答案

local.settings.json 用于存储本地开发环境的应用程序设置,请参阅 Local settings file 。生产设置将从 Azure 环境配置中获取。

project.json 用于引用您的函数使用的任何自定义 NuGet 包,请参阅 this answer .

关于azure - Azure Functions 中的 .json 文件的用途是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45038237/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com