Add chess (Oh my gosh big commit)
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
using JoshHeaps.Net.Hubs;
|
||||
using JoshHeaps.Net.Services.Implementations;
|
||||
using JoshHeaps.Net.Services.Interfaces;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddRazorPages();
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
builder.Services.AddSignalR();
|
||||
|
||||
builder.Services.AddSingleton<IChessService, ChessService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
@@ -14,7 +24,16 @@ if (!app.Environment.IsDevelopment())
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
OnPrepareResponse = ctx =>
|
||||
{
|
||||
ctx.Context.Response.Headers.Append("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||
ctx.Context.Response.Headers.Append("Pragma", "no-cache");
|
||||
ctx.Context.Response.Headers.Append("Expires", "0");
|
||||
}
|
||||
});
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
@@ -22,4 +41,8 @@ app.UseAuthorization();
|
||||
|
||||
app.MapRazorPages();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.MapHub<ChessHub>("/chessHub");
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user