Add SPA to the Drive project for further usage

This commit is contained in:
2025-07-25 22:47:23 +08:00
parent d13fb8b0e4
commit 123dce564c
41 changed files with 2311 additions and 8 deletions

View File

@@ -1,7 +1,9 @@
using DysonNetwork.Drive;
using DysonNetwork.Drive.Pages.Data;
using DysonNetwork.Drive.Startup;
using DysonNetwork.Shared.Auth;
using DysonNetwork.Shared.Http;
using DysonNetwork.Shared.PageData;
using DysonNetwork.Shared.Registry;
using Microsoft.EntityFrameworkCore;
using tusdotnet.Stores;
@@ -30,6 +32,8 @@ builder.Services.AddAppBusinessServices();
// Add scheduled jobs
builder.Services.AddAppScheduledJobs();
builder.Services.AddTransient<IPageDataProvider, VersionPageData>();
var app = builder.Build();
// Run database migrations
@@ -44,6 +48,10 @@ var tusDiskStore = app.Services.GetRequiredService<TusDiskStore>();
// Configure application middleware pipeline
app.ConfigureAppMiddleware(tusDiskStore);
app.MapGatewayProxy();
app.MapPages(Path.Combine(app.Environment.WebRootPath, "dist", "index.html"));
// Configure gRPC
app.ConfigureGrpcServices();