Added Backend Classes and FUnctions for an working Game. But lacking Implementations
This commit is contained in:
+5
-2
@@ -1,3 +1,5 @@
|
||||
using API.Services.GameManager;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
@@ -7,6 +9,8 @@ builder.Services.AddSignalR();
|
||||
builder.Services.AddOpenApi();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
builder.Services.AddSingleton<IGameManager, GameManager>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
@@ -24,9 +28,8 @@ app.UseStaticFiles();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
app.MapHub<API.Controllers.GameController>("/api/game");
|
||||
app.MapHub<API.Controllers.GameHubSocket>("/api/gamehub");
|
||||
|
||||
// SPA fallback: serve index.html for routes not matched by API or static files
|
||||
app.MapFallbackToFile("index.html");
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user