Created
May 14, 2019 20:03
-
-
Save petmat/93e1b735c5c39a88c7fd41032693ddf9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[assembly: FunctionsStartup(typeof(MyNamespace.Startup))] | |
namespace MyNamespace | |
{ | |
public class Startup : FunctionsStartup | |
{ | |
public override void Configure(IFunctionsHostBuilder builder) | |
{ | |
builder.Services.AddHttpClient(); | |
builder.Services.AddSingleton((s) => { | |
return new CosmosClient(Environment.GetEnvironmentVariable("COSMOSDB_CONNECTIONSTRING")); | |
}); | |
builder.Services.AddSingleton<ILoggerProvider, MyLoggerProvider>(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment