using GxPress.Common.Tools; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; using Serilog; namespace GxPress.Api { public class Program { public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); } public static IHostBuilder CreateHostBuilder(string[] args) { return Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseUrls("http://0.0.0.0:83/"); webBuilder.UseSerilog((hostingContext, loggerConfiguration) => { loggerConfiguration.ReadFrom.Configuration(hostingContext.Configuration); loggerConfiguration.Enrich.FromLogContext(); }); webBuilder.UseStartup(); }); } } }