mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
38 lines
996 B
C#
38 lines
996 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.Commerce);
|
|
builder.AddDorkNetServices();
|
|
|
|
var app = builder.Build();
|
|
|
|
await app.RunDatabaseBootstrapAsync();
|
|
app.MapDorkNetServiceDefaults(mapPublicHealth: false);
|
|
app.MapGet("/internal/commerce/capabilities", () =>
|
|
Results.Ok(new ServiceCapabilityResponse(
|
|
ServiceNames.Commerce,
|
|
[
|
|
"catalog",
|
|
"storefronts",
|
|
"econ",
|
|
"inventory",
|
|
"inventions",
|
|
],
|
|
[
|
|
"/api/catalog/*",
|
|
"/api/storefronts/*",
|
|
"/econ/*",
|
|
"/api/equipment/*",
|
|
"/api/inventions/*",
|
|
])));
|
|
|
|
app.UseDorkNetRouteOwnershipGuard(ServiceNames.Commerce);
|
|
app.UseDorkNetPipeline();
|
|
|
|
app.Run();
|