Corrected project name

Replaced "Sinky" with "Leaky" in the backend
This commit is contained in:
aronmal 2022-08-06 22:30:25 +02:00
parent fe945a3e06
commit cf92993e8a
Signed by: aronmal
GPG key ID: 816B7707426FC612
18 changed files with 38 additions and 38 deletions

View file

@ -0,0 +1,41 @@
using LeakyShipsAPI.Hubs;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSignalR();
builder.Services.AddSwaggerGen();
builder.Services.AddCors();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
app.UseCors(policyBuilder => policyBuilder
.AllowAnyHeader()
.AllowAnyMethod()
.AllowAnyOrigin()
.AllowCredentials()
);
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapHub<GameHub>("/hub");
});
app.MapGet("/", () => "Hello World!");
//Websocket functions
//SessionStart name -> sessionId
//SessionJoin sessionCode, name -> sessionId
//StartGame sessionId, settings
//SubmitBoard shipPositions[] ->
//
app.Run();