* test add queueing to file service * further adjustments to download queueing * add check for whether the request is still in the queue to CheckQueue * forcefully release slot if download didn't finish in 15s * actually cancel the delay task * add metrics and refactor some of the request queue service * refactor pathing * reuse httpclient * add queue request dto to requestfile, enqueue users immediately if a slot is available * change startup to include all controllers * update server pathing * update pathing, again * several adjustments to auth, banning, jwt server tokens, renaming, authorization * update api I guess * adjust automated banning of charaident and reg * generate jwt on servers for internal authentication * remove mvcextensions Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
36 lines
1.4 KiB
C#
36 lines
1.4 KiB
C#
using MareSynchronosShared.Services;
|
|
using MareSynchronosShared.Utils;
|
|
|
|
namespace MareSynchronosStaticFilesServer;
|
|
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
var hostBuilder = CreateHostBuilder(args);
|
|
var host = hostBuilder.Build();
|
|
|
|
using (var scope = host.Services.CreateScope())
|
|
{
|
|
var options = host.Services.GetService<IConfigurationService<StaticFilesServerConfiguration>>();
|
|
var optionsServer = host.Services.GetService<IConfigurationService<MareConfigurationAuthBase>>();
|
|
var logger = host.Services.GetService<ILogger<Program>>();
|
|
logger.LogInformation("Loaded MareSynchronos Static Files Server Configuration (IsMain: {isMain})", options.IsMain);
|
|
logger.LogInformation(options.ToString());
|
|
logger.LogInformation("Loaded MareSynchronos Server Auth Configuration (IsMain: {isMain})", optionsServer.IsMain);
|
|
logger.LogInformation(optionsServer.ToString());
|
|
}
|
|
|
|
host.Run();
|
|
}
|
|
|
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
|
Host.CreateDefaultBuilder(args)
|
|
.UseSystemd()
|
|
.UseConsoleLifetime()
|
|
.ConfigureWebHostDefaults(webBuilder =>
|
|
{
|
|
webBuilder.UseContentRoot(AppContext.BaseDirectory);
|
|
webBuilder.UseStartup<Startup>();
|
|
});
|
|
} |