2018-01-18 17:29:23 +01:00
|
|
|
|
using Microsoft.AspNetCore;
|
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
|
|
|
|
namespace Ordering.BackgroundTasks
|
|
|
|
|
{
|
|
|
|
|
public class Program
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
BuildWebHost(args).Run();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static IWebHost BuildWebHost(string[] args) =>
|
|
|
|
|
WebHost.CreateDefaultBuilder(args)
|
|
|
|
|
.UseStartup<Startup>()
|
2018-01-19 16:09:55 +01:00
|
|
|
|
.UseHealthChecks("/hc")
|
2018-01-18 17:29:23 +01:00
|
|
|
|
.ConfigureLogging((hostingContext, builder) =>
|
|
|
|
|
{
|
|
|
|
|
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
|
|
|
|
builder.AddDebug();
|
|
|
|
|
builder.AddConsole();
|
|
|
|
|
}).Build();
|
|
|
|
|
}
|
|
|
|
|
}
|