2017-07-13 17:35:19 +02:00
|
|
|
|
using Basket.API.Infrastructure.Middlewares;
|
2017-08-29 10:20:13 +02:00
|
|
|
|
using Microsoft.AspNetCore;
|
2017-07-13 17:35:19 +02:00
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
2016-09-06 17:09:19 -07:00
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
2017-08-29 10:20:13 +02:00
|
|
|
|
using Microsoft.Extensions.Logging;
|
2017-02-23 09:34:00 -08:00
|
|
|
|
using System.IO;
|
2016-09-06 17:09:19 -07:00
|
|
|
|
|
2016-09-07 13:52:26 -07:00
|
|
|
|
namespace Microsoft.eShopOnContainers.Services.Basket.API
|
2016-09-06 17:09:19 -07:00
|
|
|
|
{
|
|
|
|
|
public class Program
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
2017-08-29 10:20:13 +02:00
|
|
|
|
BuildWebHost(args).Run();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static IWebHost BuildWebHost(string[] args) =>
|
|
|
|
|
WebHost.CreateDefaultBuilder(args)
|
2017-07-13 17:35:19 +02:00
|
|
|
|
.UseFailing(options =>
|
|
|
|
|
{
|
2017-08-29 10:20:13 +02:00
|
|
|
|
options.ConfigPath = "/Failing";
|
2017-07-13 17:35:19 +02:00
|
|
|
|
})
|
2017-03-23 19:10:55 +01:00
|
|
|
|
.UseHealthChecks("/hc")
|
2016-09-06 17:09:19 -07:00
|
|
|
|
.UseContentRoot(Directory.GetCurrentDirectory())
|
|
|
|
|
.UseStartup<Startup>()
|
2017-08-29 10:20:13 +02:00
|
|
|
|
.ConfigureLogging((hostingContext, builder) =>
|
|
|
|
|
{
|
|
|
|
|
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
|
|
|
|
builder.AddConsole();
|
|
|
|
|
builder.AddDebug();
|
|
|
|
|
})
|
2016-09-06 17:09:19 -07:00
|
|
|
|
.Build();
|
|
|
|
|
}
|
|
|
|
|
}
|