thewar_server/Server/Program.cs

31 lines
628 B
C#

using Server.HTML;
using Server.System;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
//웹서버 초기화
ProtocolProcessor.Init();
//깃 웹훅 초기화
GItWebhook.Init();
//http용 데이터
app.MapPost("/", ProtocolProcessor.Process);
//git 접근용 웹훅
app.MapPost("/git", GItWebhook.Process);
//app.MapPost("/update", GItWebhook.Process);
#if DEBUG
app.MapGet("/spin", Spin.Main);
app.MapPost("/spin/random", Spin.Random);
#endif
app.Run(Statics.URL);
//서버 테이블과 클라이언트 테이블을 찾아 따로두고
//서버 업데이트시 db에서 한번더 받아오는것이 아닌 받은값을 서버에 바로 세팅하는 방식으로 변경