如何发布我的 Azure Function 的 local.settings.json?
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"CosmoDbAuthKey": "***********************************",
"CosmoDbEndpoint": "https://**************************:443/",
"CosmosDbId": "***Notifications"
}
}
最佳答案
此答案并不容忍发布 local.settings.json
文件的做法,因为它仅用于本地开发和调试。其他人已经强调了这一点,但他们显然错误地认为“无法发布”。确实有一个发布它的方法,它在Microsoft's online docs中指定。 :
By default, these settings are not migrated automatically when the project is published to Azure. Use the --publish-local-settings switch when you publish to make sure these settings are added to the function app in Azure. Note that values in ConnectionStrings are never published.
关于Azure Functions-发布 local.settings.json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62669606/