Skip to content

Commit

Permalink
Remove custom configuration sources
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnygunawan committed Nov 26, 2023
1 parent 2718f89 commit 7acea04
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions BotNet/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,12 @@
using BotNet.Services.Weather;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Orleans.Hosting;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

// Configuration sources
builder.Configuration.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: true, reloadOnChange: true)
.AddKeyPerFile("/run/secrets", optional: true, reloadOnChange: true)
.AddEnvironmentVariables("ASPNETCORE_")
.AddUserSecrets<BotService>(optional: true, reloadOnChange: true);

// DI Services
builder.Services.Configure<HostingOptions>(builder.Configuration.GetSection("HostingOptions"));
builder.Services.Configure<TenorOptions>(builder.Configuration.GetSection("TenorOptions"));
Expand Down Expand Up @@ -102,6 +94,6 @@
app.UseRouting();
app.UseResponseCaching();
app.UseResponseCompression();
app.MapControllers();
app.MapDefaultControllerRoute();

app.Run();

0 comments on commit 7acea04

Please sign in to comment.