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