mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 15:08:47 -07:00
38 lines
957 B
C#
38 lines
957 B
C#
using DorkNet.Contracts;
|
|
using DorkNet.ServiceDefaults;
|
|
using DorkNet.Server.Startup;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
builder.Configuration.AddJsonFile("appsettings.Local.json",
|
|
optional: true, reloadOnChange: true);
|
|
|
|
builder.AddDorkNetServiceDefaults(ServiceNames.Content);
|
|
builder.AddDorkNetServices();
|
|
|
|
var app = builder.Build();
|
|
|
|
await app.RunDatabaseBootstrapAsync();
|
|
app.MapDorkNetServiceDefaults(mapPublicHealth: false);
|
|
app.MapGet("/internal/content/capabilities", () =>
|
|
Results.Ok(new ServiceCapabilityResponse(
|
|
ServiceNames.Content,
|
|
[
|
|
"cdn",
|
|
"images",
|
|
"photos",
|
|
"room-blobs",
|
|
"storage",
|
|
],
|
|
[
|
|
"/api/images/*",
|
|
"/api/photos/*",
|
|
"/data/*",
|
|
"/img/*",
|
|
"/upload",
|
|
])));
|
|
|
|
app.UseDorkNetRouteOwnershipGuard(ServiceNames.Content);
|
|
app.UseDorkNetPipeline();
|
|
|
|
app.Run();
|