in src/React.Template/reactnet-webpack/Startup.cs [37:64]
public void Configure(IApplicationBuilder app, IHostEnvironment env)
{
// Initialise ReactJS.NET. Must be before static files.
app.UseReact(config =>
{
config
.SetReuseJavaScriptEngines(true)
.SetLoadBabel(false)
.SetLoadReact(false)
.SetReactAppBuildPath("~/dist");
});
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute("default", "{path?}", new { controller = "Home", action = "Index" });
endpoints.MapControllerRoute("comments-root", "comments", new { controller = "Home", action = "Index" });
endpoints.MapControllerRoute("comments", "comments/page-{page}", new { controller = "Home", action = "Comments" });
});
}