29 lines
937 B
C#
29 lines
937 B
C#
using Microsoft.AspNetCore;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.Extensions.Logging;
|
|
using System.IO;
|
|
|
|
namespace Microsoft.eShopOnContainers.Services.Catalog.API
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
BuildWebHost(args).Run();
|
|
}
|
|
|
|
public static IWebHost BuildWebHost(string[] args) =>
|
|
WebHost.CreateDefaultBuilder(args)
|
|
.UseStartup<Startup>()
|
|
.UseHealthChecks("/hc")
|
|
.UseContentRoot(Directory.GetCurrentDirectory())
|
|
.UseWebRoot("Pics")
|
|
.ConfigureLogging((hostingContext, builder) =>
|
|
{
|
|
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
|
builder.AddConsole();
|
|
builder.AddDebug();
|
|
})
|
|
.Build();
|
|
}
|
|
} |