feat: add signalr hub and github workflow
This commit is contained in:
@@ -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");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user