From e9ea621b93fbb58d9edfca8375918791637bbd52 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 Dec 2020 20:59:04 +0800 Subject: +init --- .../DebugPluginStartup.cs | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Impostor-dev/src/Impostor.Plugins.Debugger/DebugPluginStartup.cs (limited to 'Impostor-dev/src/Impostor.Plugins.Debugger/DebugPluginStartup.cs') diff --git a/Impostor-dev/src/Impostor.Plugins.Debugger/DebugPluginStartup.cs b/Impostor-dev/src/Impostor.Plugins.Debugger/DebugPluginStartup.cs new file mode 100644 index 0000000..cc36ce6 --- /dev/null +++ b/Impostor-dev/src/Impostor.Plugins.Debugger/DebugPluginStartup.cs @@ -0,0 +1,35 @@ +using Impostor.Api.Plugins; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace Impostor.Plugins.Debugger +{ + public class DebugPluginStartup : IPluginStartup + { + public void ConfigureServices(IServiceCollection services) + { + services.AddRazorPages(); + services.AddServerSideBlazor(); + } + + public void ConfigureHost(IHostBuilder host) + { + host.ConfigureWebHostDefaults(webBuilder => + { + webBuilder.Configure(app => + { + app.UseStaticFiles(); + app.UseRouting(); + + app.UseEndpoints(endpoints => + { + endpoints.MapBlazorHub(); + endpoints.MapFallbackToPage("/_Host"); + }); + }); + }); + } + } +} \ No newline at end of file -- cgit v1.1-26-g67d0