using right env name, updating npm, using service extension methods

This commit is contained in:
andy 2021-12-07 23:31:17 +00:00
parent ecf79f146a
commit 2cb2df3f5c
4 changed files with 1195 additions and 3849 deletions

View File

@ -74,9 +74,9 @@ namespace Selector.Model
{ {
configFile = GetPath("Development"); configFile = GetPath("Development");
} }
else if(File.Exists(GetPath("Release"))) else if(File.Exists(GetPath("Production")))
{ {
configFile = GetPath("Release"); configFile = GetPath("Production");
} }
else else
{ {

View File

@ -5,6 +5,8 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Hosting.WindowsServices;
using Microsoft.Extensions.Hosting.Systemd;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using NLog.Extensions.Logging; using NLog.Extensions.Logging;
@ -24,6 +26,8 @@ namespace Selector.Web
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}) })
.UseWindowsService()
.UseSystemd()
.ConfigureLogging((context, builder) => { .ConfigureLogging((context, builder) => {
builder.ClearProviders(); builder.ClearProviders();
builder.SetMinimumLevel(LogLevel.Trace); builder.SetMinimumLevel(LogLevel.Trace);

View File

@ -118,7 +118,7 @@ namespace Selector.Web
{ {
app.UseExceptionHandler("/Error"); app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts(); //app.UseHsts();
} }
app.UseHttpsRedirection(); app.UseHttpsRedirection();

File diff suppressed because it is too large Load Diff