Add project files.

This commit is contained in:
Aleksandr Popov
2023-06-24 17:15:56 +02:00
parent 2550bc81d5
commit 32813531e2
17 changed files with 461 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
using Microsoft.AspNetCore;
using TURN.Services.Chess;
using LoggerFactory = TURN.Libraries.Core.LoggerFactory;
NLog.Logger logger = LoggerFactory.GetLogger();
logger.Info("Chess app starting.");
try
{
IWebHost host = BuildWebHost(args);
host.Run();
}
catch (Exception ex)
{
logger.Error(ex);
}
IWebHost BuildWebHost(string[] args) => WebHost
.CreateDefaultBuilder(args)
.CaptureStartupErrors(false)
.ConfigureServices(services =>
{
_ = services.AddSingleton(logger);
})
.UseStartup<Startup>()
.Build();