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

removing app.config and web.config and putting in code

starting support for mysql (for linux)
This commit is contained in:
RaidMax
2018-04-06 19:15:17 -05:00
parent e8481b5b25
commit 724d4a64c4
15 changed files with 1097 additions and 102 deletions

View File

@ -16,7 +16,19 @@ namespace WebfrontCore
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: false)
.AddEnvironmentVariables();
Configuration = builder.Build();
// fixme: this is really really terrible
if (!SharedLibrary.Utilities.IsRunningOnMono())
{
SharedLibrary.Database.DatabaseContext.ConnectionString = Configuration["ConnectionStrings:WindowsConnection"];
}
else
{
SharedLibrary.Database.DatabaseContext.ConnectionString = Configuration["ConnectionStrings:LinuxConnection"];
}
if (!IW4MAdmin.Program.Start())
Environment.Exit(-1);