Corrected project name
Replaced "Sinky" with "Leaky" in the backend
This commit is contained in:
parent
fe945a3e06
commit
cf92993e8a
18 changed files with 38 additions and 38 deletions
|
@ -1,41 +0,0 @@
|
|||
using SinkyShipsAPI.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();
|
Loading…
Add table
Add a link
Reference in a new issue