Add microservices scaffold

This commit is contained in:
Alexa
2026-06-15 14:01:23 +03:00
parent ac3432bf9a
commit 53bf0054fd
22 changed files with 567 additions and 0 deletions
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\DorkNet.Contracts\DorkNet.Contracts.csproj" />
<ProjectReference Include="..\DorkNet.ServiceDefaults\DorkNet.ServiceDefaults.csproj" />
</ItemGroup>
</Project>
+31
View File
@@ -0,0 +1,31 @@
using DorkNet.Contracts;
using DorkNet.ServiceDefaults;
var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddJsonFile("appsettings.Local.json",
optional: true, reloadOnChange: true);
builder.AddDorkNetServiceDefaults(ServiceNames.Rooms);
var app = builder.Build();
app.MapDorkNetServiceDefaults();
app.MapGet("/internal/rooms/capabilities", () =>
Results.Ok(new ServiceCapabilityResponse(
ServiceNames.Rooms,
[
"rooms",
"subrooms",
"room-keys",
"matchmaking",
"discovery",
],
[
"/rooms/*",
"/api/rooms/*",
"/roomserver/*",
"/v1/find",
"/v1/join/*",
])));
app.Run();
+8
View File
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}