Permalink
Browse files

Configuring SignalR, adding static files middleware

  • Loading branch information...
moozzyk committed Sep 15, 2017
1 parent 43e5650 commit 884797c14ba3ee40420fc1de38101097c4119eb0
Showing with 5 additions and 2 deletions.
  1. +5 −2 SignalRChat/Startup.cs
View
@@ -15,6 +15,7 @@ public class Startup
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddSignalR();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -25,9 +26,11 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseDeveloperExceptionPage();
}
app.Run(async (context) =>
app.UseFileServer();
app.UseSignalR(routes =>
{
await context.Response.WriteAsync("Hello World!");
routes.MapHub<ChatHub>("chat");
});
}
}

0 comments on commit 884797c

Please sign in to comment.