I'm building a SPA application using React-Router to handle the front-end routing.
I'm trying to configure the ASP.NET 5 Startup.cs file to use MVC but when a route does not match any of my API routes to send the index.html file so that it will be able to handle react-routers browser history implementation as stated here.
So far i've only been able to get it to send the index.html file when on the default route, i.e. nothing after the localhost:3000.
My Startup Configure method so far. Thank you
app.UseIdentity();
app.UseIISPlatformHandler();
app.UseDefaultFiles(new DefaultFilesOptions {
DefaultFileNames = new List<string> { "index.html"}
});
app.UseStaticFiles();
app.UseMvc();