Http w/ dispatch

This commit is contained in:
rafi1212122 committed 2023-05-24 17:18:36 +07:00
1 parent df32db9a60
commit 8343f08f90
15 files changed
+708 -12

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
using Common;
using HttpServer.Controllers;
namespace HttpServer
{
public class Program
{
public static void Main()
{
Thread.CurrentThread.IsBackground = true;
var builder = WebApplication.CreateBuilder();
var app = builder.Build();
app.UsePathBase("/");
app.Urls.Add($"http://*:{Global.config.Http.HttpPort}");
app.Urls.Add($"https://*:{Global.config.Http.HttpsPort}");
DispatchController.AddHandlers(app);
app.Run();
}
}
}