initial plumbing and conversion to mvc
This commit is contained in:
parent
70934782df
commit
8ab8dd5654
16
BinaryDad.Coding/Controllers/HomeController.cs
Normal file
16
BinaryDad.Coding/Controllers/HomeController.cs
Normal 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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -19,7 +19,7 @@ namespace BinaryDad.Coding
|
|||||||
// This method gets called by the runtime. Use this method to add services to the container.
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddRazorPages();
|
services.AddMvc();
|
||||||
services.AddSignalR();
|
services.AddSignalR();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ namespace BinaryDad.Coding
|
|||||||
|
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
{
|
{
|
||||||
endpoints.MapRazorPages();
|
endpoints.MapControllerRoute("default", "{action=Index}/{id?}", new { controller = "Home" });
|
||||||
endpoints.MapHub<CodeHub>("/codeHub");
|
endpoints.MapHub<CodeHub>("/codeHub");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user