我可以看到 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文件的用途是什么?
最佳答案
文档中的解释非常清楚,来自文档,
The host.json metadata file contains global configuration options that affect all functions for a function app. This article lists the settings that are available starting with version 2.x of the Azure Functions runtime.
The local.settings.json file stores app settings, connection strings, and settings used by local development tools. Settings in the local.settings.json file are used only when you're running projects locally.
关于Azure Functions - 拥有 host.json 和 local.settings.json 的目的是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62669672/