initial plumbing and conversion to mvc

This commit is contained in:
Ryan Peters 2021-07-22 19:45:32 -04:00
parent 70934782df
commit 8ab8dd5654
2 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,16 @@
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace BinaryDad.Coding.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
return Content("ok");
}
}
}

View File

@ -19,7 +19,7 @@ namespace BinaryDad.Coding
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddMvc();
services.AddSignalR();
}
@ -43,7 +43,7 @@ namespace BinaryDad.Coding
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
endpoints.MapControllerRoute("default", "{action=Index}/{id?}", new { controller = "Home" });
endpoints.MapHub<CodeHub>("/codeHub");
});
}