Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Environment variable example
public class FunctionAppConfiguration : IFunctionAppConfiguration
{
public void Build(IFunctionHostBuilder builder)
{
builder
.Setup((serviceCollection, commandRegistry) =>
{
serviceCollection
.AddCosmosRepository(Environment.GetEnvironmentVariable("cosmosConnectionString", EnvironmentVariableTarget.Process));
// rest of registration
})
.Functions(...);
}
}
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"cosmosConnectionString": "a connection string"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.