DevServer things :>
This commit is contained in:
10
Moonlight.ApiServer/DevServer.cs
Normal file
10
Moonlight.ApiServer/DevServer.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Moonlight.ApiServer;
|
||||
|
||||
public static class DevServer
|
||||
{
|
||||
public async static Task Run(string[] args)
|
||||
{
|
||||
Console.WriteLine("Preparing development server");
|
||||
await Program.Main(args);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,20 @@
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using MoonCore.Extended.Extensions;
|
||||
using MoonCore.Extended.Helpers;
|
||||
using MoonCore.Extensions;
|
||||
using MoonCore.Helpers;
|
||||
using MoonCore.PluginFramework.Extensions;
|
||||
using MoonCore.Services;
|
||||
using Moonlight.ApiServer;
|
||||
using Moonlight.ApiServer.Configuration;
|
||||
using Moonlight.ApiServer.Helpers;
|
||||
using Moonlight.ApiServer.Http.Middleware;
|
||||
using Moonlight.ApiServer.Implementations;
|
||||
using Moonlight.ApiServer.Interfaces.Auth;
|
||||
using Moonlight.ApiServer.Interfaces.OAuth2;
|
||||
using Moonlight.ApiServer.Interfaces.Startup;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static async Task Main(string[] args)
|
||||
{
|
||||
// Cry about it
|
||||
#pragma warning disable ASP0000
|
||||
|
||||
@@ -73,7 +73,7 @@ startupServiceCollection.AddPlugins(configuration =>
|
||||
configuration.AddInterface<IEndpointStartup>();
|
||||
|
||||
// Configure assemblies to scan
|
||||
configuration.AddAssembly(Assembly.GetEntryAssembly()!);
|
||||
configuration.AddAssembly(typeof(Program).Assembly);
|
||||
});
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ builder.Services.AddPlugins(configuration =>
|
||||
configuration.AddInterface<IOAuth2Provider>();
|
||||
configuration.AddInterface<IAuthInterceptor>();
|
||||
|
||||
configuration.AddAssembly(Assembly.GetEntryAssembly()!);
|
||||
configuration.AddAssembly(typeof(Program).Assembly);
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
@@ -193,4 +193,6 @@ app.MapControllers();
|
||||
if (config.Client.Enable)
|
||||
app.MapFallbackToFile("index.html");
|
||||
|
||||
app.Run();
|
||||
await app.RunAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user