2019-07-23 10:07:50 +02:00
|
|
|
|
using Microsoft.AspNetCore;
|
2018-02-27 14:32:25 +01:00
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
2020-12-15 14:42:56 +01:00
|
|
|
|
using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator;
|
2018-12-13 12:13:59 +01:00
|
|
|
|
using Serilog;
|
2018-02-27 14:32:25 +01:00
|
|
|
|
|
2020-12-15 14:42:56 +01:00
|
|
|
|
BuildWebHost(args).Run();
|
2019-08-27 15:08:39 +02:00
|
|
|
|
|
2020-12-15 14:42:56 +01:00
|
|
|
|
IWebHost BuildWebHost(string[] args) =>
|
|
|
|
|
WebHost
|
|
|
|
|
.CreateDefaultBuilder(args)
|
|
|
|
|
.ConfigureAppConfiguration(cb =>
|
|
|
|
|
{
|
|
|
|
|
var sources = cb.Sources;
|
|
|
|
|
sources.Insert(3, new Microsoft.Extensions.Configuration.Json.JsonConfigurationSource()
|
|
|
|
|
{
|
|
|
|
|
Optional = true,
|
|
|
|
|
Path = "appsettings.localhost.json",
|
|
|
|
|
ReloadOnChange = false
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.UseStartup<Startup>()
|
|
|
|
|
.UseSerilog((builderContext, config) =>
|
|
|
|
|
{
|
|
|
|
|
config
|
|
|
|
|
.MinimumLevel.Information()
|
|
|
|
|
.Enrich.FromLogContext()
|
|
|
|
|
.WriteTo.Console();
|
|
|
|
|
})
|
|
|
|
|
.Build();
|