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

more api tweaks

removed WebfrontSettings
IW4MAdminSettings are only generated when the file does not exist, placeholder values stored in DefaultSettings.json
This commit is contained in:
RaidMax
2018-04-19 00:48:14 -05:00
parent 2f336c1291
commit 8e9d8e46c7
31 changed files with 310 additions and 77 deletions

View File

@ -17,15 +17,12 @@ namespace WebfrontCore
public static void Init(IManager mgr)
{
Manager = mgr;
BuildWebHost().Run();
}
public static IWebHost BuildWebHost()
{
var config = new ConfigurationBuilder()
.AddJsonFile("WebfrontSettings.json", optional: false, reloadOnChange: false)
.AddEnvironmentVariables()
.Build();
@ -35,7 +32,7 @@ namespace WebfrontCore
#else
.UseContentRoot(Directory.GetCurrentDirectory())
#endif
.UseUrls(config["Web:Address"])
.UseUrls(Manager.GetApplicationSettings().Configuration().WebfrontBindUrl)
.UseKestrel()
.UseStartup<Startup>()
.Build();