feat: add signalr hub and github workflow

This commit is contained in:
2021-06-29 01:01:01 -04:00
parent daf4e9ef26
commit b547ea17e7
8 changed files with 265 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TetrisClone.WebApi.Hubs;
namespace TetrisClone.WebApi
{
@@ -26,8 +27,8 @@ namespace TetrisClone.WebApi
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddSignalR();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "TetrisClone.WebApi", Version = "v1" });
@@ -53,6 +54,7 @@ namespace TetrisClone.WebApi
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapHub<PlayerHub>("/player");
});
}
}