32 lines
627 B
C#
32 lines
627 B
C#
using Server.System;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
var app = builder.Build();
|
|
|
|
//로그 레벨 설정
|
|
#if DEBUG
|
|
NLog.GlobalDiagnosticsContext.Set("logLevel", "Trace");
|
|
#elif LIVE
|
|
NLog.GlobalDiagnosticsContext.Set("logLevel", "Info");
|
|
#endif
|
|
//웹서버 초기화
|
|
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);
|