wabbajack/Wabbajack.Server/Program.cs

31 lines
926 B
C#
Raw Normal View History

2021-10-23 16:51:17 +00:00
using System.Linq;
2020-05-09 13:04:38 +00:00
using System.Net;
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
2021-10-23 16:51:17 +00:00
namespace Wabbajack.Server;
public class Program
2020-05-09 13:04:38 +00:00
{
2021-10-23 16:51:17 +00:00
public static void Main(string[] args)
{
var testMode = args.Contains("TESTMODE");
CreateHostBuilder(args, testMode).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args, bool testMode)
2020-05-09 13:04:38 +00:00
{
2021-10-23 16:51:17 +00:00
return Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>()
.UseKestrel(options =>
{
2021-12-02 00:12:21 +00:00
options.AllowSynchronousIO = true;
2021-11-27 18:31:35 +00:00
options.Listen(IPAddress.Any, 5000);
2021-10-23 16:51:17 +00:00
options.Limits.MaxRequestBodySize = null;
});
});
2020-05-09 13:04:38 +00:00
}
2021-10-23 16:51:17 +00:00
}