wabbajack/Wabbajack.Server/Program.cs
2021-11-27 11:31:35 -07:00

30 lines
867 B
C#

using System.Linq;
using System.Net;
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace Wabbajack.Server;
public class Program
{
public static void Main(string[] args)
{
var testMode = args.Contains("TESTMODE");
CreateHostBuilder(args, testMode).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args, bool testMode)
{
return Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>()
.UseKestrel(options =>
{
options.Listen(IPAddress.Any, 5000);
options.Limits.MaxRequestBodySize = null;
});
});
}
}