Rename old C# backend folder

This commit is contained in:
aronmal 2022-10-26 00:12:48 +02:00
parent f3eb84d812
commit dc685661a7
Signed by: aronmal
GPG key ID: 816B7707426FC612
16 changed files with 0 additions and 0 deletions

View file

@ -1,41 +0,0 @@
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();