mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-13 01:14:35 +01:00
Http w/ dispatch
This commit is contained in:
24
HttpServer/Program.cs
Normal file
24
HttpServer/Program.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user