add signalr support

This commit is contained in:
2023-01-25 08:48:50 -05:00
parent 1ee15a8ed3
commit 5a015b379b
9 changed files with 89 additions and 61 deletions

View File

@ -1,9 +1,11 @@
using BinaryDad.Notes;
using BinaryDad.Notes.Services;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllersWithViews();
builder.Services.AddSignalR();
builder.Services.AddSingleton<INoteService, FileNoteService>();
var app = builder.Build();
@ -24,4 +26,6 @@ app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
app.MapHub<NoteHub>("/noteHub");
app.Run();