This commit is contained in:
2020-05-30 20:31:20 +00:00
parent 7f7b5c3ac2
commit be77138403
3 changed files with 16 additions and 4 deletions

View File

@@ -63,9 +63,18 @@ namespace AyaNova
_newLog.LogDebug("Initializing services...");
_newLog.LogDebug("Profiler");
//https://dotnetthoughts.net/using-miniprofiler-in-aspnetcore-webapi/
services.AddMemoryCache();
services.AddMiniProfiler(options =>
{
options.RouteBasePath = "/profiler";
}).AddEntityFramework();
//Server state service for shutting people out of api
_newLog.LogDebug("ApiServerState");
_newLog.LogDebug("ServerState service");
services.AddSingleton(new AyaNova.Api.ControllerHelpers.ApiServerState());
//Init controllers
@@ -289,7 +298,7 @@ namespace AyaNova
#endregion
_newLog.LogDebug("Generator");
services.AddSingleton<IHostedService, GeneratorService>();