Azure Functions - What is the purpose of having host.json and local.settings.json
Jul 1
I can see two json files(host.json and local.settings.json) has been added in Azure Function directory.
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"
}
}
What is the purpose of having these two json files?
1 answer
Accepted answer · original discussion
Jul 1
It is very clearly explained in the documentation , from the docs,
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.
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.