Prepare for deployment of v0.1
This commit is contained in:
parent
ac993a59ba
commit
925a009f00
4 changed files with 59 additions and 2 deletions
14
API/Controllers/FallbackController.cs
Normal file
14
API/Controllers/FallbackController.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System.IO;
|
||||
using API.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace API.Controllers
|
||||
{
|
||||
public class FallbackController : Controller
|
||||
{
|
||||
public ActionResult Index()
|
||||
{
|
||||
return PhysicalFile(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "index.html"), "text/HTML");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -58,10 +58,14 @@ namespace API
|
|||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseDefaultFiles();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
endpoints.MapHangfireDashboard();
|
||||
endpoints.MapFallbackToController("Index", "Fallback");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue