Skip to content

Instantly share code, notes, and snippets.

@StephanyBatista
Last active May 23, 2016 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StephanyBatista/678cda67ac182183477c12528c6781fe to your computer and use it in GitHub Desktop.
Save StephanyBatista/678cda67ac182183477c12528c6781fe to your computer and use it in GitHub Desktop.
public Startup(IHostingEnvironment env)
{
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
if (env.IsDevelopment())
{
// For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709
builder.AddUserSecrets();
// This will push telemetry data through Application Insights pipeline faster, allowing you to view results immediately.
builder.AddApplicationInsightsSettings(developerMode: true);
}
builder.AddEnvironmentVariables();
Configuration = builder.Build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment