1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 23:31:13 -05:00

fixed minification and bundling

template tweaks
This commit is contained in:
RaidMax
2018-04-09 22:33:42 -05:00
parent 1bcf3a0b94
commit 3f7cb69fcd
33 changed files with 6384 additions and 1022 deletions

View File

@ -1,5 +1,6 @@
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using SharedLibraryCore.Interfaces;
namespace WebfrontCore
@ -16,18 +17,28 @@ namespace WebfrontCore
public static void Init(IManager mgr)
{
Manager = mgr;
BuildWebHost().Run();
}
public static IWebHost BuildWebHost() =>
new WebHostBuilder()
public static IWebHost BuildWebHost()
{
var config = new ConfigurationBuilder()
.AddJsonFile("WebfrontSettings.json", optional: false, reloadOnChange: false)
.AddEnvironmentVariables()
.Build();
return new WebHostBuilder()
#if DEBUG
.UseContentRoot(Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), @"..\..\..\..\", "WebfrontCore")))
#else
.UseContentRoot(Directory.GetCurrentDirectory())
#endif
.UseUrls(config["Web:Address"])
.UseKestrel()
.UseStartup<Startup>()
.Build();
}
}
}