diff --git a/BinaryDad.Coding/Controllers/HomeController.cs b/BinaryDad.Coding/Controllers/HomeController.cs new file mode 100644 index 0000000..94472e8 --- /dev/null +++ b/BinaryDad.Coding/Controllers/HomeController.cs @@ -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"); + } + } +} diff --git a/BinaryDad.Coding/Startup.cs b/BinaryDad.Coding/Startup.cs index 6444356..69c19ee 100644 --- a/BinaryDad.Coding/Startup.cs +++ b/BinaryDad.Coding/Startup.cs @@ -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"); }); }