gpt4 book ai didi

Azure Functions - 拥有 host.json 和 local.settings.json 的目的是什么

转载 作者:行者123 更新时间:2023-12-03 14:06:47 30 4
gpt4 key购买 nike

我可以看到 Azure Function 目录中已添加两个 json 文件(host.json 和 local.settings.json)。

host.json

{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingExcludedTypes": "Request",
"samplingSettings": {
"isEnabled": true
}
}
}
}

local.settings.json

{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
}
}

这两个json文件的用途是什么?

最佳答案

文档中的解释非常清楚,来自文档,

host.json

The host.json metadata file contains global configuration options thataffect all functions for a function app. This article lists thesettings that are available starting with version 2.x of the AzureFunctions runtime.

Local settings

The local.settings.json file stores app settings, connection strings,and settings used by local development tools. Settings in thelocal.settings.json file are used only when you're running projectslocally.

关于Azure Functions - 拥有 host.json 和 local.settings.json 的目的是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62669672/

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