You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.0 KiB
32 lines
1.0 KiB
using System;
|
|
using CompanyName.ProjectName.Extensions;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.Extensions.Hosting;
|
|
using Serilog;
|
|
using Serilog.Events;
|
|
|
|
namespace CompanyName.ProjectName
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
CreateHostBuilder(args).Build().Run();
|
|
}
|
|
|
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
|
Host.CreateDefaultBuilder(args)
|
|
.ConfigureWebHostDefaults(webBuilder =>
|
|
{
|
|
webBuilder.ConfigureKestrel((context, options) => { options.Limits.MaxRequestBodySize = 1024 * 50; });
|
|
webBuilder.UseStartup<Startup>();
|
|
})
|
|
.UseSerilog((context, loggerConfiguration) =>
|
|
{
|
|
SerilogToEsExtensions.SetSerilogConfiguration(
|
|
loggerConfiguration,
|
|
context.Configuration,
|
|
context.HostingEnvironment);
|
|
}).UseAutofac();
|
|
}
|
|
}
|
|
|