Created
August 6, 2018 16:45
-
-
Save JamesRandall/dbd37f40e08a50d9c4c082cfd22f00ba to your computer and use it in GitHub Desktop.
Environment variable example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FunctionAppConfiguration : IFunctionAppConfiguration | |
{ | |
public void Build(IFunctionHostBuilder builder) | |
{ | |
builder | |
.Setup((serviceCollection, commandRegistry) => | |
{ | |
serviceCollection | |
.AddCosmosRepository(Environment.GetEnvironmentVariable("cosmosConnectionString", EnvironmentVariableTarget.Process)); | |
// rest of registration | |
}) | |
.Functions(...); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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