aboutsummaryrefslogtreecommitdiff
path: root/ShareGuard.Web/Program.cs
diff options
context:
space:
mode:
authorTim <contact@bytim.eu>2025-12-25 19:59:26 +0100
committerTim <contact@bytim.eu>2025-12-25 19:59:26 +0100
commit771b949618bb4e07c09c2fb94a7f92e13f471b9e (patch)
tree88c2e69fc14bef91e414c605712420437cc92ccf /ShareGuard.Web/Program.cs
Initial commitHEADmaster
Diffstat (limited to 'ShareGuard.Web/Program.cs')
-rw-r--r--ShareGuard.Web/Program.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/ShareGuard.Web/Program.cs b/ShareGuard.Web/Program.cs
new file mode 100644
index 0000000..250e4d4
--- /dev/null
+++ b/ShareGuard.Web/Program.cs
@@ -0,0 +1,23 @@
+using ShareGuard.Web;
+using ShareGuard.Web.Components;
+using _Imports = ShareGuard.Web.Client._Imports;
+
+var builder = WebApplication.CreateBuilder(args);
+
+builder.Services.AddRazorComponents()
+ .AddInteractiveServerComponents()
+ .AddInteractiveWebAssemblyComponents();
+
+var app = builder.Build();
+
+app.UseAntiforgery();
+
+app.MapStaticAssets();
+app.MapRazorComponents<App>()
+ .AddInteractiveServerRenderMode()
+ .AddInteractiveWebAssemblyRenderMode()
+ .AddAdditionalAssemblies(typeof(_Imports).Assembly);
+
+app.MapPost("/api/redeem/{token}/", Api.Redeem);
+
+app.Run(); \ No newline at end of file