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:
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user